On Apr 18, 2013, at 11:33 PM, Nathaniel Smith n...@pobox.com wrote:
On 18 Apr 2013 01:29, Chris Barker - NOAA Federal chris.bar...@noaa.gov
wrote:
This has been annoying, particular as rank-zero scalars are kind of a
pain.
BTW, while we're on the topic, can you elaborate on this? I tend to
Robert,
As I think you wrote the code, you may have a quick answer:
Given that numpy scalars do exist, and have their uses -- I found this
wiki page to remind me:
http://projects.scipy.org/numpy/wiki/ZeroRankArray
It would be nice if the .npy format could support them. Would that be
a major
On Fri, 2013-04-19 at 08:03 -0700, Chris Barker - NOAA Federal wrote:
On Apr 18, 2013, at 11:33 PM, Nathaniel Smith n...@pobox.com wrote:
On 18 Apr 2013 01:29, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
This has been annoying, particular as rank-zero scalars are kind
On Fri, Apr 19, 2013 at 8:45 PM, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
Robert,
As I think you wrote the code, you may have a quick answer:
Given that numpy scalars do exist, and have their uses -- I found this
wiki page to remind me:
On Fri, Apr 19, 2013 at 9:40 PM, Sebastian Berg
sebast...@sipsolutions.net wrote:
Fun fact, array[()] will convert a 0-d array to a scalar, but do nothing
(or currently create a view) for other arrays. Which is actually a good
question. Should array[()] force a view or not?
Another fun fact:
On Fri, 2013-04-19 at 23:02 +0530, Robert Kern wrote:
On Fri, Apr 19, 2013 at 9:40 PM, Sebastian Berg
sebast...@sipsolutions.net wrote:
Fun fact, array[()] will convert a 0-d array to a scalar, but do nothing
(or currently create a view) for other arrays. Which is actually a good
On Fri, Apr 19, 2013 at 10:21 AM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Apr 19, 2013 at 8:45 PM, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
Given that numpy scalars do exist, and have their uses -- I found this
wiki page to remind me:
On 19 Apr 2013 19:22, Chris Barker - NOAA Federal chris.bar...@noaa.gov
wrote:
Anyway -- going to HDF, or netcdf, or role-your-own really seems like
overkill for this. I just need something fast and simple and it
doesn't need to interchange with anything else.
Just use pickle...?
-n
On Fri, Apr 19, 2013 at 11:31 AM, Nathaniel Smith n...@pobox.com wrote:
On 19 Apr 2013 19:22, Chris Barker - NOAA Federal chris.bar...@noaa.gov
wrote:
Anyway -- going to HDF, or netcdf, or role-your-own really seems like
overkill for this. I just need something fast and simple and it
doesn't
19.04.2013 22:06, Chris Barker - NOAA Federal kirjoitti:
On Fri, Apr 19, 2013 at 11:31 AM, Nathaniel Smith n...@pobox.com wrote:
On 19 Apr 2013 19:22, Chris Barker - NOAA Federal chris.bar...@noaa.gov
wrote:
Anyway -- going to HDF, or netcdf, or role-your-own really seems like
overkill for
On Sat, Apr 20, 2013 at 12:36 AM, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
On Fri, Apr 19, 2013 at 11:31 AM, Nathaniel Smith n...@pobox.com wrote:
On 19 Apr 2013 19:22, Chris Barker - NOAA Federal chris.bar...@noaa.gov
wrote:
Anyway -- going to HDF, or netcdf, or role-your-own
On Thu, Apr 18, 2013 at 5:58 AM, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
Folks,
I've discovered somethign intertesting (bug?) with numpy scalars ans
savz. If I save a numpy scalar, then reload it, ot comes back as
rank-0 array -- similar, but not the same thing:
In [144]:
On Thu, Apr 18, 2013 at 4:04 AM, Robert Kern robert.k...@gmail.com wrote:
np.save() and company (and the NPY format itself) are for arrays, not
for scalars. np.save() uses an np.asanyarray() to coerce its input
which is why your scalar gets converted to a rank-zero array.
Fair enough -- so a
On Thu, Apr 18, 2013 at 8:31 AM, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
Fair enough -- so a missing feature, not bug -- I'll need to look at
the docs and see if that can be clarified -
All I've found is the docstring docs (which also show up in the Sphinx
docs). I suggest
On Thu, Apr 18, 2013 at 9:20 PM, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
On Thu, Apr 18, 2013 at 8:31 AM, Chris Barker - NOAA Federal
chris.bar...@noaa.gov wrote:
Fair enough -- so a missing feature, not bug -- I'll need to look at
the docs and see if that can be clarified -
Folks,
I've discovered somethign intertesting (bug?) with numpy scalars ans
savz. If I save a numpy scalar, then reload it, ot comes back as
rank-0 array -- similar, but not the same thing:
In [144]: single_value, type(single_value)
Out[144]: (2.0, numpy.float32)
In [145]: np.savez('test.npz',
16 matches
Mail list logo