Re: [Numpy-discussion] advanced indexing question

2015-02-04 Thread Sebastian Berg
On Mi, 2015-02-04 at 07:22 +, David Kershaw wrote: The numpy reference manual, array objects/indexing/advance indexing, says: Advanced indexing always returns a copy of the data (contrast with basic slicing that returns a view). If I run the following code: import numpy as np

Re: [Numpy-discussion] advanced indexing question

2015-02-04 Thread David Kershaw
Sebastian Berg sebastian at sipsolutions.net writes: Python has a mechanism both for getting an item and for setting an item. The latter will end up doing this (python already does this for us): x[:,d,:,d] = x[:,d,:,d] + 1 so there is an item assignment going on (__setitem__ not __getitem__)

Re: [Numpy-discussion] Characteristic of a Matrix.

2015-02-04 Thread Colin J. Williams
On 06/01/2015 8:38 PM, Alexander Belopolsky wrote: On Tue, Jan 6, 2015 at 8:20 PM, Nathaniel Smith n...@pobox.com mailto:n...@pobox.com wrote: Since matrices are now part of some high school curricula, I urge that they be treated appropriately in Numpy. Further, I suggest that

Re: [Numpy-discussion] Characteristic of a Matrix.

2015-02-04 Thread Colin J. Williams
On 08/01/2015 1:19 PM, Ryan Nelson wrote: Colin, I'll second the endorsement of Sage; however, for teaching purposes, I would suggest Sage Math Cloud. It is a free, web-based version of Sage, and it does not require you or the students to install any software (besides a new-ish web

Re: [Numpy-discussion] Any interest in a 'heaviside' ufunc?

2015-02-04 Thread Daπid
On 4 February 2015 at 11:05, Sturla Molden sturla.mol...@gmail.com wrote: On 04/02/15 06:18, Warren Weckesser wrote: By discrete form, do you mean discrete time (i.e. a function defined on the integers)? Then I agree, the discrete time unit step function is defined as It is the cumulative

Re: [Numpy-discussion] Any interest in a 'heaviside' ufunc?

2015-02-04 Thread Sturla Molden
On 04/02/15 06:18, Warren Weckesser wrote: By discrete form, do you mean discrete time (i.e. a function defined on the integers)? Then I agree, the discrete time unit step function is defined as It is the cumulative integral of the delta function, and thus it can never obtain the value 0.5.

Re: [Numpy-discussion] Views of a different dtype

2015-02-04 Thread Jaime Fernández del Río
On Tue, Feb 3, 2015 at 1:52 PM, Ian Henriksen insertinterestingnameh...@gmail.com wrote: On Tue Feb 03 2015 at 1:47:34 PM Jaime Fernández del Río jaime.f...@gmail.com wrote: On Tue, Feb 3, 2015 at 8:59 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Di, 2015-02-03 at 07:18