You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we generate arrays irrelevant to test cases, e.g. arrays with no NaNs in a test case about NaN behaviour. A low-priority thing is to generate test cases which are relevant to the test case (either by xps.arrays(..., elements={...}) or xps.arrays(...).filter(...)). Probably requires some significant reworking of generate_stubs.py.
It seems like the only problem with numpy.array_api (when running 2000 examples) is in-place addition.
>>>x1=xp.asarray(-0.0)
>>>x1Array(-0., dtype=float64)
>>>x2=xp.asarray(-0.0)
>>>xp.add(x1, x2)
Array(-0., dtype=float64)
>>>x1+x2Array(-0., dtype=float64)
>>>x1+=x2>>>x1Array(0., dtype=float64) # not negative 0, like it is with xp.add() and __add__()
Interestingly I had to run like 200 examples to get this error consistently. Something for the future would be to filter strategies from the @given() level so that only arrays with NaNs/infs/whateverproperty-we're-testing are generated, which would mitigate this problem.
The text was updated successfully, but these errors were encountered:
Right now we generate arrays irrelevant to test cases, e.g. arrays with no NaNs in a test case about NaN behaviour. A low-priority thing is to generate test cases which are relevant to the test case (either by
xps.arrays(..., elements={...})
orxps.arrays(...).filter(...)
). Probably requires some significant reworking ofgenerate_stubs.py
.To quote myself from #38:
The text was updated successfully, but these errors were encountered: