[Numpy-discussion] Re: [Python-Help] Numeric bug, or my misunderstanding?

Daniel Yoo dyoo at hkn.eecs.berkeley.edu
Sun Dec 3 03:32:50 EST 2000

On Fri, 1 Dec 2000, chad scherrer wrote:

> >>> import Numeric
> >>> def mod2(x): return x%2
> >>> apply(mod2, [-3])
> 1
> >>> apply(mod2, Numeric.array([-3]))
> 1
> >>> apply(mod2, Numeric.array([[-3]]))
> array([-1])
> Should that not be array([1]) ?

Hmmm.  Good point; This looks weird to me too.  You should probably talk
to the Numeric Python people at the Numpy-discussion newsgroup:


I'll try to forward this message to that group, so perhaps they'll be able
to figure out if it's a true bug.

I hope that your answer will be answered quickly.  Good luck!

More information about the NumPy-Discussion mailing list