Hi,

I downloaded&installed matplotlib 0.87.7 and other binary packages from
pythonmac.org for my new Intel Mac Pro. Then I downloaded and compiled the
latest scipy package. My collection of packages runs ok otherwise but there
seems to be something wrong with pylab/masked array behavior.

This works on my older installations (g5):

import matplotlib
matplotlib.use("TkAgg")
from pylab import *
from MA import *
#import MA
a=arange(100)
a.shape=(5,20)
a=swapaxes(a,0,1)
m=array([1,2,3],mask=[0,1,0])
#m=MA.array([1,2,3],mask=[0,1,0])

On my Intel Mac Pro, I get:
File "test.py", line 12, in ?
    a=swapaxes(a,0,1)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/fromnumeric.py",
line 106, in swapaxes
    return _wrapit(a, 'swapaxes', axis1, axis2)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/fromnumeric.py",
line 39, in _wrapit
    result = getattr(asarray(obj),method)(*args, **kwds)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/numeric.py",
line 132, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: object __array__ method not producing an array


There seems to be some kind of name space conflict. The line
'a=swapaxes(a,0,1)' works as expected without 'from MA import *'. If I do
'import MA' and use MA.array etc for all operations with masked arrays
everything seems to work fine. 

Any ideas where the conflict might be coming from? 

--
Teemu Rinne
Dept Psychology
University of Helsinki

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to