-
Notifications
You must be signed in to change notification settings - Fork 137
Correct 'XCTAssertEqual(_:_:)' argument order. #155
Conversation
Please do tell me, If I have missed anything. I'll request a review once i'm done with all the files in the directory |
@rxwei @eaplatanios requesting a review. Most probably only cleanup needed, |
Also, I did skim the rest of the tests, there seem to be no errors in them. |
@rxwei There's just so many PRs xD. Can you trigger a build on this? |
Alright, all the builds seem to be failing because of the error on line 296. This should fix that. |
@rxwei so the error is that Actually the tests passed before i changed that particular piece of code, should i just reverse it? |
Apply the following change will fix the error. - let expected = Array(stride(from: 20.0, to: 30, by: 2)) +
- Array(stride(from: 45.0, to: 50, by: 1)) +
- Array(stride(from: 30.0, to: 40, by: 2)) +
- Array(stride(from: 55.0, to: 60, by: 1))
-
/// Test shapes
XCTAssertEqual(array3D.shape, [1, 4, 5])
XCTAssertEqual(array2D.shape, [2, 5])
XCTAssertEqual(array1D.shape, [2])
/// Test scalars
- XCTAssertEqual(array3D.scalars, expected)
+ XCTAssertEqual(array3D.scalars,
+ [Float](stride(from: 20.0, to: 30, by: 2)) +
+ Array(stride(from: 45.0, to: 50, by: 1)) +
+ [Float](stride(from: 30.0, to: 40, by: 2)) +
+ [Float](stride(from: 55.0, to: 60, by: 1)))
XCTAssertEqual(array2D.scalars, Array(stride(from: 20.0, to: 30, by: 1)))
XCTAssertEqual(array1D.scalars, Array(stride(from: 3.0, to: 5, by: 1)))
} |
@rxwei @eaplatanios Can you help me debug this ?
|
This is a bug that appears in Linux and not Mac. You can track its progress in #161. |
and the math errors @eaplatanios, can you also check if the values are right or wrong? NOTE : oh well, none of the errors seem to stem from the changes i made. all are from expm1. |
the dataset errors persist. I thought it would be because of the order. but the reason seems to be something else. @rxwei if we sort these errors out, then we are good to go ahead with this PR. |
@Shashi456 The numerical errors in the tests should be fixed in #147. I'm not sure why we get the other failures on Linux yet. |
@eaplatanios are you saying the dataset tests fail only on linux? |
I believe so yes. At least they don't fail on my MacBook. |
@eaplatanios, that's very strange |
So @rxwei just a small question, Do you think this is a issue within the code? because @eaplatanios did mention that they are passing on mac OS. I'm inclined to believe it's an ubuntu issue, Edit : I tested the code after these changes and it threw the same errors |
Thanks! |
fix #153