Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78847 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2014-10-08 13:19 -0600 |
| Last post | 2014-10-08 13:19 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: strange numpy behaviour Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-08 13:19 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2014-10-08 13:19 -0600 |
| Subject | Re: strange numpy behaviour |
| Message-ID | <mailman.14686.1412796015.18130.python-list@python.org> |
On Wed, Oct 8, 2014 at 10:29 AM, George Trojan <george.trojan@noaa.gov> wrote: > This does not look right: > > dilbert@gtrojan> python3.4 > Python 3.4.1 (default, Jul 7 2014, 15:47:25) > [GCC 4.8.3 20140624 (Red Hat 4.8.3-1)] on linux > Type "help", "copyright", "credits" or "license" for more information. >>>> import numpy as np >>>> a=np.ma.array([0, 1], dtype=np.int8, mask=[1, 0]) >>>> a > masked_array(data = [-- 1], > mask = [ True False], > fill_value = 999999) > >>>> a.data > array([0, 1], dtype=int8) >>>> a.filled() > array([63, 1], dtype=int8) <------- Why 63? >>>> > > What do you think? The datatype is int8, the fill value is the default of 999999, and 999999 & 0xff == 63.
Back to top | Article view | comp.lang.python
csiph-web