On Wed, Oct 7, 2009 at 1:20 PM, Christopher Barker
wrote:
> josef.p...@gmail.com wrote:
>
>> I wanted to avoid the python loop and thought creating the view will be
>> faster
>> with large arrays. But for this I need to know the memory length of a
>> row of arbitrary types for the conversion to s
josef.p...@gmail.com wrote:
> I wanted to avoid the python loop and thought creating the view will be faster
> with large arrays. But for this I need to know the memory length of a
> row of arbitrary types for the conversion to strings,
ndarray.itemsize
might do it.
-Chris
--
Christopher B
On Tue, Oct 6, 2009 at 4:39 PM, Christopher Barker
wrote:
> josef.p...@gmail.com wrote:
>> If I have a structured or a regular array, is the use of strides in
>> the following always correct for the length of the row memory?
>>
>> I would like to do tostring() but on each row, by creating a string
josef.p...@gmail.com wrote:
> If I have a structured or a regular array, is the use of strides in
> the following always correct for the length of the row memory?
>
> I would like to do tostring() but on each row, by creating a string
> view of the memory in a 1d array.
Maybe I'm missing what you
If I have a structured or a regular array, is the use of strides in
the following always correct for the length of the row memory?
I would like to do tostring() but on each row, by creating a string
view of the memory in a 1d array.
Thanks,
Josef
>>> tmp = np.random.randn(4,3)
>>> tmp.ravel().