On 8/3/11 12:50 PM, Christopher Barker wrote:
> As a reference, reading that much data in from a raw file into a numpy
> array takes 2.57 on my machine (a rather old Mac, but disks haven't
> gotten much faster).
2.57 seconds? or minutes? If seconds, does it actually read the whole
thing into mem
As best I can tell, I have Python 2.7.2 for my system Python:
[ijstokes@moose ~]$ python -V
Python 2.7.2
[ijstokes@moose ~]$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
however when I attempt to install the recent numpy binary
python-2.7.2-macosx10.6.dmg I get stop
On 2/26/11 3:36 AM, Wolfgang Kerzendorf wrote:
> I have a n dimensional grid. The grids axes are linear but not
> intergers. Let's say I want the value in gridcell [3.2,-5.6,0.01]. Is
> there an easy way to transform the index? Do I have to write my own
> class to accomplish this. Is there an
Like most people these days, I have multiple 24" monitors. I don't need
"print" of ndarrays to wrap after 72 columns. Is there some way to
change this?
TIA
Ian
CURRENT:
[NaN NaN NaN NaN NaN 5.1882094
1.19646584]]
DESIRED:
[NaN Na
On 12/22/10 9:16 AM, Ian Stokes-Rees wrote:
> What is the most efficient way to do the Matlab equivalent of nnz(M)
> (nnz = number-of-non-zeros function)?
Thanks to all the various responses. I should have mentioned that I'm
using scipy.sparse, and lil_matrix objects have a met
What is the most efficient way to do the Matlab equivalent of nnz(M)
(nnz = number-of-non-zeros function)?
I've tried Google, but no luck.
My assumption is that something like
a != 0
will be used, but I'm not sure then how to "count" the number of "True"
entries.
TIA.
Ian
<>__
> Note that there are various extant projects that I think attempt to
> provide similar functionality to what you're wanting (unless I badly
> misread your original email, in which case apologies):
> http://projects.scipy.org/numpy/wiki/NdarrayWithNamedAxes
Having looked into it more, I think
>> But wouldn't the performance hit only come when I use it in this way?
>> __getattr__ is only called if the named attribute is *not* found (I
>> guess it falls off the end of the case statement, or is the result of
>> the attribute hash table "miss").
> That's why I said that __getattr__ would p
On 10/28/10 5:29 PM, Robert Kern wrote:
> On Thu, Oct 28, 2010 at 15:17, Ian Stokes-Rees
> wrote:
>> I have an ndarray with named dimensions. I find myself writing some
>> fairly laborious code with lots of square brackets and quotes. It seems
>> like it wouldn
I have an ndarray with named dimensions. I find myself writing some
fairly laborious code with lots of square brackets and quotes. It seems
like it wouldn't be such a big deal to overload __getattribute__ so
instead of doing:
r = genfromtxt('results.dat',dtype=[('a','int'), ('b', 'f8'),
('c','in
> The open source community is all about volunteering and with that
> being said, I wouldn't expect the conference organizers to necessarily
> be involved in the cooridination of such an initiative.
>
> I almost feel its a duty of someone to pick up the ball and run with it.
But keep in mind th
place.
Ian
--
Ian Stokes-ReesW: http://sbgrid.org
ijsto...@crystal.harvard.edu T: +1 617 432-5608 x75
SBGrid, Harvard Medical School F: +1 617 432-5600
___
NumPy-Discussion mailing list
NumPy-Discu
en(lines),len(dtype)), dtype=dtype)
...
results[idx]= [score, rfac, codefull, code2, subset]
or indexing into the array:
results[:,0]
results[:,1]
results[:].take(0)
results[:][0] # this works, but doesn't return the desired first column
Any suggestions greatly appreciate
ion
>
--
Ian Stokes-ReesW: http://sbgrid.org
ijsto...@crystal.harvard.edu T: +1 617 432-5608 x75
SBGrid, Harvard Medical School F: +1 617 432-5600
___
NumPy-Discussion mailing list
NumPy-Discu
14 matches
Mail list logo