summaryrefslogtreecommitdiff
path: root/numpy/doc/misc.py
diff options
context:
space:
mode:
authorGerrit Holl <g.holl@reading.ac.uk>2015-11-25 20:35:22 +0000
committerGerrit Holl <g.holl@reading.ac.uk>2015-12-07 16:44:56 +0000
commit090e85e7bd77e67c8b6bac63fc4b22331eac1950 (patch)
treed89dce235425b419ef44226122a3eab26f45de8a /numpy/doc/misc.py
parentdb6300726ac9f73282ce8fda5588d958c0f327b4 (diff)
downloadnumpy-090e85e7bd77e67c8b6bac63fc4b22331eac1950.tar.gz
BUG/TST: Fix for #6723 including test: force fill_value.ndim==0
Fix issue #6723. Given an exotic masked structured array, where one of the fields has a multidimensional dtype, make sure that, when accessing this field, the fill_value still makes sense. As it stands prior to this commit, the fill_value will end up being multidimensional, possibly with a shape incompatible with the mother array, which leads to broadcasting errors in methods such as .filled(). This commit uses the first element of this multidimensional fill value as the new fill value. When more than one unique value existed in fill_value, a warning is issued. Also add a test to verify that fill_value.ndim remains 0 after indexing.
Diffstat (limited to 'numpy/doc/misc.py')
0 files changed, 0 insertions, 0 deletions