On Thu, Sep 20, 2012 at 2:48 PM, Nathaniel Smith n...@pobox.com wrote:
because a += b
really should be the same as a = a + b.
I don't think that's the case - the inplace operator should be (and
are) more than syntactic sugar -- they have a different meaning and
use (in fact, I think they
On 21 Sep 2012 17:31, Chris Barker chris.bar...@noaa.gov wrote:
On Thu, Sep 20, 2012 at 2:48 PM, Nathaniel Smith n...@pobox.com wrote:
because a += b
really should be the same as a = a + b.
I don't think that's the case - the inplace operator should be (and
are) more than syntactic sugar
On Fri, Sep 21, 2012 at 10:03 AM, Nathaniel Smith n...@pobox.com wrote:
You're right of course. What I meant is that
a += b
should produce the same result as
a[...] = a + b
If we change the casting rule for the first one but not the second, though,
then these will produce different
On Fri, Sep 21, 2012 at 10:04 PM, Chris Barker chris.bar...@noaa.gov wrote:
On Fri, Sep 21, 2012 at 10:03 AM, Nathaniel Smith n...@pobox.com wrote:
You're right of course. What I meant is that
a += b
should produce the same result as
a[...] = a + b
If we change the casting rule for the
On 2012/09/21 12:20 PM, Nathaniel Smith wrote:
On Fri, Sep 21, 2012 at 10:04 PM, Chris Barker chris.bar...@noaa.gov wrote:
On Fri, Sep 21, 2012 at 10:03 AM, Nathaniel Smith n...@pobox.com wrote:
You're right of course. What I meant is that
a += b
should produce the same result as
On Fri, Sep 21, 2012 at 5:51 PM, Eric Firing efir...@hawaii.edu wrote:
On 2012/09/21 12:20 PM, Nathaniel Smith wrote:
On Fri, Sep 21, 2012 at 10:04 PM, Chris Barker chris.bar...@noaa.gov
wrote:
On Fri, Sep 21, 2012 at 10:03 AM, Nathaniel Smith n...@pobox.com
wrote:
You're right of
On Wed, Sep 19, 2012 at 1:08 AM, Charles R Harris
charlesr.har...@gmail.com wrote:
snip
The relevant setting is in numpy/core/include/numpy/ndarraytypes.h
#define NPY_DEFAULT_ASSIGN_CASTING NPY_SAME_KIND_CASTING
I think that if we want to raise a warning we could define a new rule,
On Mon, Sep 17, 2012 at 9:33 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Mon, Sep 17, 2012 at 3:40 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 17, 2012, at 8:42 AM, Benjamin Root wrote:
Consider the following code:
import numpy as np
a = np.array([1, 2, 3, 4,
On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root ben.r...@ou.edu wrote:
On Mon, Sep 17, 2012 at 9:33 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Sep 17, 2012 at 3:40 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 17, 2012, at 8:42 AM, Benjamin Root wrote:
On Sep 18, 2012, at 1:47 PM, Charles R Harris wrote:
On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root ben.r...@ou.edu wrote:
On Mon, Sep 17, 2012 at 9:33 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Mon, Sep 17, 2012 at 3:40 PM, Travis Oliphant tra...@continuum.io
On Tue, Sep 18, 2012 at 1:08 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 18, 2012, at 1:47 PM, Charles R Harris wrote:
On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root ben.r...@ou.edu wrote:
On Mon, Sep 17, 2012 at 9:33 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 9:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root ben.r...@ou.edu wrote:
On Mon, Sep 17, 2012 at 9:33 PM, Charles R Harris
On Tue, Sep 18, 2012 at 3:19 PM, Ralf Gommers ralf.gomm...@gmail.comwrote:
On Tue, Sep 18, 2012 at 9:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root
On Tue, Sep 18, 2012 at 1:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root ben.r...@ou.edu wrote:
On Mon, Sep 17, 2012 at 9:33 PM, Charles R Harris
On Tue, Sep 18, 2012 at 3:25 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Tue, Sep 18, 2012 at 1:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root
On Tue, Sep 18, 2012 at 1:35 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 3:25 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 1:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris
On 2012/09/18 9:25 AM, Charles R Harris wrote:
On Tue, Sep 18, 2012 at 1:13 PM, Benjamin Root ben.r...@ou.edu
mailto:ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris
charlesr.har...@gmail.com mailto:charlesr.har...@gmail.com wrote:
On Tue, Sep
On Sep 18, 2012, at 2:44 PM, Charles R Harris wrote:
On Tue, Sep 18, 2012 at 1:35 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 3:25 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Tue, Sep 18, 2012 at 1:13 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 2:33 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 18, 2012, at 2:44 PM, Charles R Harris wrote:
On Tue, Sep 18, 2012 at 1:35 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 3:25 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 4:42 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Tue, Sep 18, 2012 at 2:33 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 18, 2012, at 2:44 PM, Charles R Harris wrote:
On Tue, Sep 18, 2012 at 1:35 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 10:52 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 4:42 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 2:33 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 18, 2012, at 2:44 PM, Charles R Harris wrote:
On Tue, Sep 18, 2012 at 2:52 PM, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Sep 18, 2012 at 4:42 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Sep 18, 2012 at 2:33 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 18, 2012, at 2:44 PM, Charles R Harris wrote:
That is sort of the point of all this. We are using 16 bit integers because
we wanted to be as efficient as possible and didn't need anything larger.
Note, that is what we changed the code to, I am just wondering if we are
being too cautious. The casting kwarg looks to be what I
snip
The relevant setting is in numpy/core/include/numpy/ndarraytypes.h
#define NPY_DEFAULT_ASSIGN_CASTING NPY_SAME_KIND_CASTING
I think that if we want to raise a warning we could define a new rule,
NPY_WARN_SAME_KIND_CASTING
Which would do the same as unsafe, only raise a warning on the
On Tue, Sep 18, 2012 at 6:08 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
snip
The relevant setting is in numpy/core/include/numpy/ndarraytypes.h
#define NPY_DEFAULT_ASSIGN_CASTING NPY_SAME_KIND_CASTING
I think that if we want to raise a warning we could define a new rule,
Consider the following code:
import numpy as np
a = np.array([1, 2, 3, 4, 5], dtype=np.int16)
a *= float(255) / 15
In v1.6.x, this yields:
array([17, 34, 51, 68, 85], dtype=int16)
But in master, this throws an exception about failing to cast via same_kind.
Note that numpy was smart about this
On Sep 17, 2012, at 8:42 AM, Benjamin Root wrote:
Consider the following code:
import numpy as np
a = np.array([1, 2, 3, 4, 5], dtype=np.int16)
a *= float(255) / 15
In v1.6.x, this yields:
array([17, 34, 51, 68, 85], dtype=int16)
But in master, this throws an exception about failing
On Mon, Sep 17, 2012 at 3:40 PM, Travis Oliphant tra...@continuum.iowrote:
On Sep 17, 2012, at 8:42 AM, Benjamin Root wrote:
Consider the following code:
import numpy as np
a = np.array([1, 2, 3, 4, 5], dtype=np.int16)
a *= float(255) / 15
In v1.6.x, this yields:
array([17, 34,
28 matches
Mail list logo