[EMAIL PROTECTED] wrote:
> I am looking for a way to create an array of the same type as another
> given array (but of different shape) that works both with Numeric and
> NumPy without being unreasonably slow. In other words, I am looking
> for a a replacement for the expression
>
> arr
[EMAIL PROTECTED] wrote:
> On 23.11.2006, at 16:29, Robert wrote:
>
>>> that will *also* (not *only*) work under NumPy (where typecode()
>>> became dtype.char). An obvious idea is reshaping array1 and
>>> multiplying by 0., but that can become quite costly.
>> timeit if *0 is really costly ... you
On 23.11.2006, at 16:29, Robert wrote:
>> that will *also* (not *only*) work under NumPy (where typecode()
>> became dtype.char). An obvious idea is reshaping array1 and
>> multiplying by 0., but that can become quite costly.
>
> timeit if *0 is really costly ... you'll not get it really cheaper
[EMAIL PROTECTED] wrote:
> I am looking for a way to create an array of the same type as another
> given array (but of different shape) that works both with Numeric and
> NumPy without being unreasonably slow. In other words, I am looking
> for a a replacement for the expression
>
> ar
I am looking for a way to create an array of the same type as another
given array (but of different shape) that works both with Numeric and
NumPy without being unreasonably slow. In other words, I am looking
for a a replacement for the expression
array2 = Numeric.zeros(shape, array1.