[Numpy-discussion] np.hist with masked values

Robert Kern robert.kern at gmail.com
Tue Sep 1 13:34:54 EDT 2009


On Tue, Sep 1, 2009 at 11:50, Tim Michelsen<timmichelsen at gmx-topmail.de> wrote:
> Hello,
> should creating a histogram with masked data be different that one cretated with
> unmasked data?

Ideally, yes. Patches are welcome. In the meantime, use the
.compressed() method on the masked array to get an ndarray with just
the unmasked data to pass into np.histogram().

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the NumPy-Discussion mailing list