From: Bill B. <wb...@gm...> - 2006-07-24 23:30:26
|
I can't answer why, but in oldnumeric.py, you can see there's two different fuctions with basically identical code, so yes they are distinct, but no they are not different. Seems like prod could be replaced by prod=product. def product (x, axis=0, dtype=None): """Product of the array elements over the given axis.""" try: prod = x.prod except AttributeError: return _wrapit(x, 'prod', axis, dtype) return prod(axis, dtype) def prod(a, axis=0, dtype=None): """Return the product of the elements along the given axis """ try: prod = a.prod except AttributeError: return _wrapit(a, 'prod', axis, dtype) return prod(axis, dtype) --bb On 7/25/06, Sebastian Haase <ha...@ms...> wrote: > Hi, > Are numpy.product() and numpy.prod() > doing the exact same thing ? If yes, why are they pointing to two different > functions ? > >>> N.prod > <function prod at 0x43cef56c> > >>> N.product > <function product at 0x43cef304> > > Thanks, > Sebastian Haase > |