[Numpy-discussion] Numpy-discussion Digest, Vol 13, Issue 11

Vincent Broman broman at spawar.navy.mil
Fri Oct 5 11:54:29 EDT 2007


On Friday, 05 October 2007, Neal Becker wrote:
> I'm thinking (again) about using numpy for signal processing applications. 
> One issue is that there are more data types that are commonly used in
> signal processing that are not available in numpy (or python). 
> Specifically, it is frequently required to convert floating point
> algorithms into integer algorithms.  numpy is fine for arrays of integers
> (of various sizes), but it is also very useful to have arrays of
> complex<integers>.  While numpy has complex<double,float>, it doesn't have
> complex<int,int_64...>  Has anyone thought about this?

Complex ints (or Gaussian integers) are algebraically interesting
but they're just a Ring, not a Field. Before you know it,
you're going to want to divide something.  In signal processing,
int measurements are usually not counters, they're just fixed point numbers
with an implicit scale, and you only want to do integer arithmetic
to save time/space, not because it is a good conceptual fit to the problem.
In an interpreted language like Python, fixed point seems like
a strange bird. I just use complex floats and a fast library.

Vincent Broman



More information about the NumPy-Discussion mailing list