Johannes Loehnert wrote:
>>numpy.sum(x, axis=None, dtype=None, out=None)
>>vs.
>>sum(sequence, start=0)
>>
>>
The problem here is that Numeric had sum before Python had sum. So,
there is a legacy issue.
As you can tell, there are limits to my concern of shadowing builtins.
That's what n
Hi,
> > This can lead to surprising bugs in code that either explicitly
> > expects it to behave like python's max() or implicitly expects that by
> > doing "from numpy import max".
my solution is to never use numpy.max. For arrays, I always use the method
call (somearray.max()). For everything
On 5/17/07, David M. Cooke <[EMAIL PROTECTED]> wrote:
On Wed, May 16, 2007 at 09:03:43PM -0400, Anne Archibald wrote:
> Hi,
>
> Numpy has a max() function. It takes an array, and possibly some extra
> arguments (axis and default). Unfortunately, this means that
>
> >>> numpy.max(-1.3,2,7)
> -1.3
On 5/16/07, David M. Cooke <[EMAIL PROTECTED]> wrote:
On Wed, May 16, 2007 at 09:03:43PM -0400, Anne Archibald wrote:
> Hi,
>
> Numpy has a max() function. It takes an array, and possibly some extra
> arguments (axis and default). Unfortunately, this means that
>
> >>> numpy.max(-1.3,2,7)
> -1.3
On Wed, May 16, 2007 at 09:03:43PM -0400, Anne Archibald wrote:
> Hi,
>
> Numpy has a max() function. It takes an array, and possibly some extra
> arguments (axis and default). Unfortunately, this means that
>
> >>> numpy.max(-1.3,2,7)
> -1.3
>
> This can lead to surprising bugs in code that eit
Anne Archibald wrote:
> On 16/05/07, Alan G Isaac <[EMAIL PROTECTED]> wrote:
>> On Wed, 16 May 2007, Anne Archibald apparently wrote:
>> numpy.max(-1.3,2,7)
^
typo
>>> -1.3
>> Is that new behavior?
>> I get a TypeError on the last argument.
>> (As ex
On 16/05/07, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> On Wed, 16 May 2007, Anne Archibald apparently wrote:
> numpy.max(-1.3,2,7)
> > -1.3
>
> Is that new behavior?
> I get a TypeError on the last argument.
> (As expected.)
For which version of numpy?
In [2]: numpy.max(-1.3,2.7)
Out[2]: -1.3
On 5/16/07, Anne Archibald <[EMAIL PROTECTED]> wrote:
> Numpy has a max() function. It takes an array, and possibly some extra
> arguments (axis and default). Unfortunately, this means that
>
> >>> numpy.max(-1.3,2,7)
> -1.3
>
> This can lead to surprising bugs in code that either explicitly
> expe
On Wed, 16 May 2007, Anne Archibald apparently wrote:
numpy.max(-1.3,2,7)
> -1.3
Is that new behavior?
I get a TypeError on the last argument.
(As expected.)
Cheers,
Alan Isaac
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
htt
On 5/17/07, Anne Archibald <[EMAIL PROTECTED]> wrote:
Hi,
Numpy has a max() function. It takes an array, and possibly some extra
arguments (axis and default). Unfortunately, this means that
>>> numpy.max(-1.3,2,7)
-1.3
This can lead to surprising bugs in code that either explicitly
expects it
Hi,
Numpy has a max() function. It takes an array, and possibly some extra
arguments (axis and default). Unfortunately, this means that
>>> numpy.max(-1.3,2,7)
-1.3
This can lead to surprising bugs in code that either explicitly
expects it to behave like python's max() or implicitly expects that
11 matches
Mail list logo