datamicroscopes / common

Base package for datamicroscopes, a non-parametric bayesian inference library
BSD 3-Clause "New" or "Revised" License
12 stars 5 forks source link

masked arrays don't work with multidimensional records #3

Open stephentu opened 10 years ago

stephentu commented 10 years ago

this is a numpy bug: https://github.com/numpy/numpy/issues/4846

but for the time being, this means that if you have a multidimensional likelihood model (e.g. NIW) then you can't have missing data.

stephentu commented 10 years ago

to work around this, we'll need to allow users to separately pass in a (non-masked) numpy array + a numpy bool array containing the masks. this is effectively what a masked array's internal representation is, so it shouldn't be that much work to adapt

argriffing commented 10 years ago

Sorry my comment on the numpy issue was a bit tongue-in-cheek and I'm not actually a numpy dev, but I still think it's technically true that there are no numpy unit tests for that interaction. For example you can use the github search for the word 'subfield' in the github numpy repo and you can see there are not many results in the source code or in issues.