Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-11-03 Thread Alexander Belopolsky
On 11/3/06, Torgil Svensson [EMAIL PROTECTED] wrote: class struct_type(Structure): _fields_ = [] ... ... which is somewhat static in nature. How do you create structures dynamically? You can put the above in a function that takes fields as an argument, or type('struct_type',

Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Alexander Belopolsky
On 10/31/06, Travis Oliphant [EMAIL PROTECTED] wrote: ... Please understand what I meant. I meant putting effort into getting PyArray_DescrConverter to allow ctypes inputs and convert to the appropriate PyArray_Descr * structure. I already understand ctypes objects. I want the dtype()

Re: [Numpy-discussion] ndarray.count() ?

2006-09-07 Thread Alexander Belopolsky
On 9/7/06, Martin Spacek [EMAIL PROTECTED] wrote: What's the most straightforward way to count, say, the number of 1s or Trues in the array? Or the number of any integer? I was surprised to discover recently that there isn't a count() method as there is for Python lists. Sorry if this has

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-06 Thread Alexander Belopolsky
On 7/6/06, Tim Hochberg [EMAIL PROTECTED] wrote: ... So this is essentially turning a row vector into a column vector? Is that right? Being a definition, this is neither right nor wrong. It all depends on what you are using it for. If you want to distinguish row and column vectors, you have

Re: [Numpy-discussion] .T Transpose shortcut for arrays again

2006-07-06 Thread Alexander Belopolsky
On 7/6/06, Tim Hochberg [EMAIL PROTECTED] wrote: ... Overloading '+' sure seems perverse, but maybe that's just me. The first time I saw it, it seemed perverse to me as well, but it actually make a lot of sense: 1. It is visually appealing as in '+' makes '|' from '-' and '-' from '|' and

Re: [Numpy-discussion] Don't like the short names like lstsq and irefft

2006-06-15 Thread Alexander Belopolsky
On 6/15/06, Paul Dubois [EMAIL PROTECTED] wrote: And yes, I think FFT is a name. (:- Exception for that. There are more exceptions that Numeric is not taking advantage of: equal, less, greater, ... - eq, lt, gt, ... inverse, generalized_inverse - inv, pinv In my view it is more important

Re: [Numpy-discussion] Array Protocol change for Python 2.6

2006-06-09 Thread Alexander Belopolsky
On 6/9/06, Travis Oliphant [EMAIL PROTECTED] wrote: ... In NumPy this is not quite the rule followed. Bascially attributes are used when getting or setting intrinsinc properties of the array. Attributes are used for properties that are important in defining what an array *is*. The flags