Re: [Numpy-discussion] Passing numpy arrays to matlab

2006-11-07 Thread Matthew Brett
Hi, > Thank you very much, I think this added documentation is pretty recent; > I have never seen it before, and I did a lot a mex programming at some > point... This whole mxarray nonsense reminds me why I gave up on matlab :), I would be very happy to help with this. It would be great if we co

[Numpy-discussion] dtype.hasobject value

2006-10-30 Thread Matthew Brett
Hi, I notice that the value for: zeros((1,), dtype=object).dtype.hasobject is now 63, whereas previously it had been 1. Is this intended? Thanks, Matthew - Using Tomcat but need to do more? Need to support web services,

[Numpy-discussion] Numpy types and object comparison

2006-10-07 Thread Matthew Brett
Hi, I am sorry, I am still struggling with object arrays - and here - numpy data types. Is there any easy way to explain why comparisons with numpy types give a different output from comparisons with non-numpy types: In [108]:oa = zeros((1,), dtype=object) In [109]:oa == int Out[109]:array([Fal

Re: [Numpy-discussion] flat indexing of object arrays

2006-10-05 Thread Matthew Brett
Hi, On 10/5/06, Martin Wiechert <[EMAIL PROTECTED]> wrote: > Hi list, > > when I try to assign a sequence as an element of an object array via flat > indexing only the first element of the sequence is assigned: I've also been having trouble with flat on object arrays. Is this intended? In [1]:

[Numpy-discussion] Downcasting to smallest storage

2006-09-25 Thread Matthew Brett
Hi, I am sorry if I have missed anything obvious here, but is there a fast simple way to downcast an array to the smallest storage that hold array data within a specified precision - e.g. a = array([1.0]) small_a = fantasy_function(a, rtol=1.0001e-05, atol=1e-08 ) b = array([1.2]) sm

Re: [Numpy-discussion] dtype truth value

2006-09-23 Thread Matthew Brett
> So, you can think of the test as > > if dtype(...): >print "Data-type has fields:" > else: >print "Data-type does not have fields:" Thank you as ever for your very clear and helpful explanation, Best, Matthew - Ta

[Numpy-discussion] dtype truth value

2006-09-23 Thread Matthew Brett
Hi, Forgive my ignorance, but why is this? In [1]:from numpy import * In [2]:if not dtype('http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.

Re: [Numpy-discussion] arr.dtype.kind is 'i' for dtype=unit !?

2006-09-21 Thread Matthew Brett
Hi, > It's in the array interface specification: > > http://numpy.scipy.org/array_interface.shtml I was interested in the 't' (bitfield) type - is there an example of usage somewhere? In [13]: dtype('t8') --- exceptions.Type

Re: [Numpy-discussion] Resolution of tickets.

2006-09-19 Thread Matthew Brett
Hi, > > You have to be logged in to the Trac site. If you have SVN write access > > you should be able to log in. Then there is a "resolution" section at > > the very bottom. > > Ah, that works. I orignally tried to register and discovered that charris > was already taken and I didn't know what

[Numpy-discussion] Segfault on byteswap() on recarrays

2006-09-18 Thread Matthew Brett
Hi, I noticed this works: In [5]:a = array((1,), dtype=[('one', 'http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listi

[Numpy-discussion] Changing byte ordering with astype fails with 0d arrays

2006-09-18 Thread Matthew Brett
Hi, As expected: In [67]:a = array([1], dtype='i4').dtype Out[68]:dtype('>i4') I was also expecting this to work for 0d arrays, but it doesn't: In [69]:a = array(1, dtype='i4').dtype Out[70]:dtype('http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___

Re: [Numpy-discussion] Problem with concatenate and object arrays

2006-09-13 Thread Matthew Brett
Hi, > For example, if you do array([a,b,c]).shape(), the answer is normally > (3,) unless a b and c happen to all be lists of the same length, at > which point your array could have a much more complicated shape... but > as the person who wrote "array([a,b,c])" it's tempting to assume that > the r

[Numpy-discussion] iscomplex on strings

2006-09-13 Thread Matthew Brett
Hi, I was surprised by this - but maybe I shouldn't have been: In [7]:iscomplex('a') Out[7]:True In [8]:iscomplex(u'a') Out[8]:True Best, Matthew - Using Tomcat but need to do more? Need to support web services, security?

Re: [Numpy-discussion] Problem with concatenate and object arrays

2006-09-05 Thread Matthew Brett
Hi, > This is a result of PyArray_FromAny changing when object arrays are > explicitly requested (which they are in this case --- although behind > the scenes). Hmm - I think I am hitting a related bug/feature/surprising change in behavior, which is showing up rather obscurely in a failure of the

[Numpy-discussion] Creating and reshaping fortran order arrays

2006-08-14 Thread Matthew Brett
Hi, I am sorry if this is obvious, but: I am working on the scipy loadmat module, and would like to use numpy to reformat the fortran order arrays that matlab saves. I was not sure how to do this, and would like to ask for advice. Let us say that I have some raw binary data as a string. The da

[Numpy-discussion] astype char conversion

2006-08-08 Thread Matthew Brett
Hi, Sorry if this is silly question, but should this work to convert from int8 to character type? a = array([104, 105], dtype=N.int8) a.astype('|S1') I was a bit surprised by the output: array([1, 1], dtype='|S1') Thanks a lot, Matthew --

Re: [Numpy-discussion] numpy vs numarray

2006-07-31 Thread Matthew Brett
Oh dear, I hope my friends remind me never to let anyone record what I say when I give a class! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your

Re: [Numpy-discussion] numpy vs numarray

2006-07-31 Thread Matthew Brett
On 7/31/06, Robert Kern <[EMAIL PROTECTED]> wrote: > Louis Cordier wrote: > > Hmmm, I think people are spreading "fud" (lower case)... > > http://media.libsyn.com/media/awaretek/Python411_060530_Numeric.mp3 > > Can you give us a synopsis? or point us to when exactly in the clip we're > supposed to

[Numpy-discussion] ERROR: check_singleton

2006-07-31 Thread Matthew Brett
Hi, Just in case this was new information: == ERROR: check_singleton (numpy.lib.tests.test_getlimits.test_longdouble) -- Traceback (most recent call last): Fil

Re: [Numpy-discussion] Time for beta1 of NumPy 1.0

2006-06-30 Thread Matthew Brett
Just one more vote for float. On the basis that Travis mentioned, of all those first-timers downloading, trying, finding something they didn't expect that was rather confusing, and giving up. Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre