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


Groups > comp.lang.python > #78846

strange numpy behaviour

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <george.trojan@noaa.gov>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.077
X-Spam-Evidence '*H*': 0.85; '*S*': 0.00; 'mask': 0.09; 'python': 0.11; 'numpy': 0.16; 'right:': 0.16; 'think?': 0.16; '>>>': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'george': 0.31; 'linux': 0.33; 'received:209.85': 0.35; 'received:google.com': 0.35; 'received:209': 0.37; 'hat': 0.38; 'to:addr:python-list': 0.38; 'received:74.125': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'more': 0.64; 'jul': 0.74; '2014,': 0.84
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=dGV5kAxaNRcz0VnCzcPQtOcjSYLGg9dEG+WU4KaPMCQ=; b=YVOOSex/j2mlJbtF59bRuhjqB0gUx+y6ozpIDgiCipVV4oCmNtTM331KIRcH+gfxy1 yADrBtQ1O7PM+mwdbplrjhwTmzsIeB61CtL5HzP6mub8klUIMybAVpFhg6HoFRRB5RWs FuoLjRSsy7VgJxZqemL5r6oIa88epJR+LNc09SwWJ+N0nthXovGgHBj5ts5oI0KqtSB1 MPrzJAMA/2bmWd8cLF/M7h9HFDLFQKz0BNMydqRaMCEEbDDX9A4Q+/vN0aj4KDYfNk1t zNTRELArapjJaRHg8SOE8cIDtQj3UC5AnKYEYuwDteisNKlrvdjyQ0VlVWTD5ABh3U/7 DmmQ==
X-Received by 10.66.160.65 with SMTP id xi1mr12156163pab.123.1412785759463; Wed, 08 Oct 2014 09:29:19 -0700 (PDT)
X-Gm-Message-State ALoCoQnDhy8xWuNGSimQ80ADZ1gnEgTx0eHc3u/CHdKbMrl6av6dxoxbj8H098rwUYfUYZB74Ex5VapZEeH4Rk1DsHN8tA/x8jRQtGQy3/B6gZzvPDBjH68ar5xOpulhfhnyc6Xlr0flZ3zQpzQkjUVJV4P5M8Rnig==
X-Received by 10.66.160.65 with SMTP id xi1mr12156147pab.123.1412785759377; Wed, 08 Oct 2014 09:29:19 -0700 (PDT)
Date Wed, 08 Oct 2014 16:29:17 +0000
From George Trojan <george.trojan@noaa.gov>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version 1.0
To python-list@python.org
Subject strange numpy behaviour
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14685.1412795465.18130.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1412795465 news.xs4all.nl 2886 [2001:888:2000:d::a6]:57420
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:78846

Show key headers only | 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