New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More dtype tracking #91
Conversation
if not all(a._dtype is not None for a in arrays): | ||
if 'dtype' in kwargs: | ||
dt = kwargs['dtype'] | ||
elif not all(a._dtype is not None for a in arrays): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as elif any(a._dtype is None for a in arrays)
, I think?
That would avoid the double-negative
Fixes dask#90
isinf = wrap_elemwise(np.isinf) | ||
isnan = wrap_elemwise(np.isnan) | ||
isinf = wrap_elemwise(np.isinf, dtype='bool') | ||
isnan = wrap_elemwise(np.isnan, dtype='bool') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isnull
and notnull
are also always dtype=bool
This gives significantly more coverage to dtype tracking. Added more logic in a few missing places
OK, tests now cover all elementwise operations (I think) and dtype checking is tied into all tests. |
Merging this soon if no comment. |
Fixes #89
As @shoyer brings up, #87 is incomplete and contains wrong results. We'll fix some here. Presumably we'll fail to find a few. Is the current approach best or should we always rely on some small amount of computation?