On Fri, May 1, 2009 at 7:39 PM, Charles R Harris
wrote:
>
>
> On Fri, May 1, 2009 at 7:24 PM, Neal Becker wrote:
>
>> Charles R Harris wrote:
>>
>> > On Fri, May 1, 2009 at 1:02 PM, Neal Becker
>> wrote:
>> >
>> >> In [16]: (np.linspace (0, len (x)-1, len(x)).astype
>> (np.uint64)*2).dtype
>> >>
On Fri, May 1, 2009 at 7:24 PM, Neal Becker wrote:
> Charles R Harris wrote:
>
> > On Fri, May 1, 2009 at 1:02 PM, Neal Becker wrote:
> >
> >> In [16]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*2).dtype
> >> Out[16]: dtype('uint64')
> >>
> >> In [17]: (np.linspace (0, len (x)-1, len
Charles R Harris wrote:
> On Fri, May 1, 2009 at 1:02 PM, Neal Becker wrote:
>
>> In [16]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*2).dtype
>> Out[16]: dtype('uint64')
>>
>> In [17]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*n).dtype
>> Out[17]: dtype('float64')
>>
>>
On Fri, May 1, 2009 at 1:02 PM, Neal Becker wrote:
> In [16]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*2).dtype
> Out[16]: dtype('uint64')
>
> In [17]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*n).dtype
> Out[17]: dtype('float64')
>
> In [18]: type(n)
> Out[18]:
>
> No
In [16]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*2).dtype
Out[16]: dtype('uint64')
In [17]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*n).dtype
Out[17]: dtype('float64')
In [18]: type(n)
Out[18]:
Now that's just strange. What's going on?
__
Suggestion for efficient way to apply a table lookup to each element of an
integer array?
import numpy as np
_cos = np.empty ((2**rom_in_bits,), dtype=int)
_sin = np.empty ((2**rom_in_bits,), dtype=int)
for address in xrange (2**12):
_cos[address] = nint ((2.0**(rom_out_bits-1)-1) * cos (2 *