for a better understanding please could someone explain this for the actual

problem?

Arrays are no longer allowed as truth values in numpy, because the "truth" of an array (except one with exactly one element) is ambiguous.

It was about simple surface plots in matplotlib... I took the 3D package

from http://matplotlib.sourceforge.net/mpl3d.zip and I changed the

following in 'mplot3d.py':

line 729:

- if Z:

+ if Z is None: --> correct or not?

Yes, that is corect.

Now I get this 'The truth value of an array with more than one element is

ambiguous. Use a.any() or a.all()' ValueError in line 680 ...

line 680:

- M = M or self.M

+ ???

I changed it to this:

def tunit_cube(self,vals=None,M=None):

if M is None:

M = self.M

xyzs = self.unit_cube(vals)

With that change, the demos both work for me.

"python surface.py" makes a nice surface plot.

Now, my question is: Is "mplot3d" planned for inclusion in future matplotlib releases? It does exactly what I need for 3d surface plots without the huge baggage and complexity of the VTK-based solutions that allow interactive 3D and all that stuff I don't need.

Cheers,

-- Paul

## ···

On Feb 15, 2006, at 7:12 AM, J.Brandenburg@...909... wrote:

--

Dr. Paul S. Ray E-mail: Paul.Ray@...706...

Naval Research Laboratory WWW : http://xweb.nrl.navy.mil/personnel/paulr/

Code 7655 Phone : (202) 404-1619

Washington, DC 20375 AIM : NRLPSR