Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78846

strange numpy behaviour

Date 2014-10-08 16:29 +0000
From George Trojan <george.trojan@noaa.gov>
Subject strange numpy behaviour
Newsgroups comp.lang.python
Message-ID <mailman.14685.1412795465.18130.python-list@python.org> (permalink)

Show all headers | View raw


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?

George

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

strange numpy behaviour George Trojan <george.trojan@noaa.gov> - 2014-10-08 16:29 +0000

csiph-web