Skip to content
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

[Dask] Dtype not changed on lazy masked integer dtype cubes #2528

Closed
djkirkham opened this issue May 4, 2017 · 3 comments
Closed

[Dask] Dtype not changed on lazy masked integer dtype cubes #2528

djkirkham opened this issue May 4, 2017 · 3 comments

Comments

@djkirkham
Copy link
Contributor

djkirkham commented May 4, 2017

Cubes with lazy masked integer data will keep their integer dtype when operations are performed on them which should result in a change of dtype (e.g. log). For example:

from numpy import ma
from iris.cube import Cube
from iris.analysis.maths import log
from iris._lazy_data import as_lazy_data

a = ma.masked_array([10,20], [0,1])
la = as_lazy_data(a)
cube = Cube(la, dtype=int)
cube = log(cube)

print cube.dtype
print cube.data

yields:

int64
[2 --]
@djkirkham djkirkham changed the title Dtype not changed on lazy masked integer dtype cubes [Dask] Dtype not changed on lazy masked integer dtype cubes May 4, 2017
@bjlittle bjlittle added the dask label May 4, 2017
@bjlittle bjlittle added this to the dask milestone May 4, 2017
@djkirkham djkirkham changed the title [Dask] Dtype not changed on lazy masked integer dtype cubes [Dask] Dtype not changed on lazy integer dtype cubes May 19, 2017
@djkirkham
Copy link
Contributor Author

Edit: Actually it's any lazy integer cube, not just masked ones

@djkirkham djkirkham changed the title [Dask] Dtype not changed on lazy integer dtype cubes [Dask] Dtype not changed on lazy masked integer dtype cubes May 19, 2017
@djkirkham
Copy link
Contributor Author

Maybe not...

@pp-mo
Copy link
Member

pp-mo commented Jul 4, 2017

Status: #2570 still open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants