[Numpy-svn] [numpy/numpy] 090e85: BUG/TST: Fix for #6723 including test: force fill_...

GitHub noreply at github.com
Tue Jan 12 20:32:45 EST 2016


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 090e85e7bd77e67c8b6bac63fc4b22331eac1950
      https://github.com/numpy/numpy/commit/090e85e7bd77e67c8b6bac63fc4b22331eac1950
  Author: Gerrit Holl <g.holl at reading.ac.uk>
  Date:   2015-12-07 (Mon, 07 Dec 2015)

  Changed paths:
    M numpy/ma/core.py
    M numpy/ma/tests/test_core.py

  Log Message:
  -----------
  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.


  Commit: bdd4558c2643c93957b7f00f2604da33ee72f83d
      https://github.com/numpy/numpy/commit/bdd4558c2643c93957b7f00f2604da33ee72f83d
  Author: ahaldane <ealloc at gmail.com>
  Date:   2016-01-12 (Tue, 12 Jan 2016)

  Changed paths:
    M numpy/ma/core.py
    M numpy/ma/tests/test_core.py

  Log Message:
  -----------
  Merge pull request #6728 from gerritholl/structured_multidim_masked_array_fillvalue

BUG/TST: Fix for #6723 including test: force fill_value.ndim==0


Compare: https://github.com/numpy/numpy/compare/2df298d9ac46...bdd4558c2643


More information about the Numpy-svn mailing list