AllenInstitute / datacube

Other
0 stars 1 forks source link

align masks prior to ANDing in `mask_field` #76

Closed chrisbarber closed 5 years ago

chrisbarber commented 6 years ago

https://github.com/AllenInstitute/datacube/blob/167932d6a86eb93ba0a54edf441f52f2b1113f66/services/pandas/datacube/datacube.py#L148-L154

I think this could cause memory issues depending on the query. In any case it makes more sense to align the individual masks before ANDing them. This is how it's handled in do_correlation:

https://github.com/AllenInstitute/datacube/blob/167932d6a86eb93ba0a54edf441f52f2b1113f66/services/pandas/datacube/datacube.py#L189

Also-- just to put this somewhere-- I noticed this variable is unused and so this line can be deleted:

https://github.com/AllenInstitute/datacube/blob/167932d6a86eb93ba0a54edf441f52f2b1113f66/services/pandas/datacube/datacube.py#L172