Skip to content

ma.masked does not have fill_value attribute #4595

Closed

Description

@abalkin
>>> np.ma.masked.fill_value
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "numpy/ma/core.py", line 3353, in get_fill_value
    if self._fill_value is None:
AttributeError: 'MaskedConstant' object has no attribute '_fill_value'

and as a consequence

>>> np.ma.masked.filled()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "numpy/ma/core.py", line 3442, in filled
    fill_value = self.fill_value
  File "numpy/ma/core.py", line 3353, in get_fill_value
    if self._fill_value is None:
AttributeError: 'MaskedConstant' object has no attribute '_fill_value'

Activity

  1. keltonhalbert commented on May 21, 2014

    @keltonhalbert

    I'm having a similar problem when passing masked values through to functions.

  2. twiecki commented on Oct 23, 2015

    @twiecki

    Just ran into the same issue.

  3. eric-wieser commented on Sep 27, 2017

    @eric-wieser
    Member

    This is fixed in 1.14-dev, and perhaps earlier:

    >>> np.ma.masked.fill_value
    1e+20
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions