Re: [Numpy-discussion] Handling interrupts in NumPy extensions

2006-08-24 Thread Travis Oliphant
David Cournapeau wrote: > Indeed. > > By the way, I tried something for python.thread + signals. This is posix > specific, and it works as expected on linux: > Am I right that this could this be accomplished simply by throwing away all the interrupt handling stuff in the code and checking for

Re: [Numpy-discussion] Handling interrupts in NumPy extensions

2006-08-24 Thread David Cournapeau
Travis Oliphant wrote: > > Right, as long as you know what to do you are O.K. I was just thinking > about a hypothetical situation where the library allocated some > temporary memory that it was going to free at the end of the subroutine > but then an interrupt jumped out back to your code befo

Re: [Numpy-discussion] hstack(arr_Int32, arr_float32) fails because of casting rules

2006-08-24 Thread Travis Oliphant
Sebastian Haase wrote: > On Thursday 24 August 2006 17:28, Travis Oliphant wrote: > >> Sebastian Haase wrote: >> >>> Hi, >>> I get >>> TypeError: array cannot be safely cast to required type >>> >>> when calling hstack() ( which calls concatenate() ) >>> on two arrays being a int32 and a

Re: [Numpy-discussion] hstack(arr_Int32, arr_float32) fails because of casting rules

2006-08-24 Thread Sebastian Haase
Travis Oliphant wrote: > Sebastian Haase wrote: >> On Thursday 24 August 2006 17:28, Travis Oliphant wrote: >> >> Are you saying the ufunc-rules would convert "int32-float32" to float64 >> and >> hence make my code "just work" !? >> > Yes. That's what I'm saying (but you would get float

Re: [Numpy-discussion] Handling interrupts in NumPy extensions

2006-08-24 Thread Travis Oliphant
David Cournapeau wrote: >>> >>> >> If nothing is known about memory allocation of the external library, >> then I don't see how it can be safely interrupted using any mechanism. >> >> > If the library does nothing w.r.t signals, then you just have to clean > all the things rel

Re: [Numpy-discussion] users point of view and ufuncs

2006-08-24 Thread Sasha
On 8/24/06, Bill Baxter <[EMAIL PROTECTED]> wrote: [snip] > Hey Sasha. Your defnition may be more correct, but I have to confess > I don't understand it. > >"Universal function. Universal functions follow similar rules for > broadcasting, coercion and "element-wise operation"." > > What is "co

Re: [Numpy-discussion] hstack(arr_Int32, arr_float32) fails because of casting rules

2006-08-24 Thread Travis Oliphant
Sebastian Haase wrote: > On Thursday 24 August 2006 17:28, Travis Oliphant wrote: > > Are you saying the ufunc-rules would convert "int32-float32" to float64 > and > hence make my code "just work" !? > Yes. That's what I'm saying (but you would get float64 out --- but if you didn't wan

Re: [Numpy-discussion] Handling interrupts in NumPy extensions

2006-08-24 Thread David Cournapeau
Travis Oliphant wrote: > I'm glad many people are thinking about it.There is no reason we > can't have a few ways to handle the situation. > > Currently in SVN, the simple > > NPY_SIGINT_ON > [code] > NPY_SIGINT_OFF > > approach is implemented (for platforms with sigsetjmp/siglongjmp). > > You

[Numpy-discussion] tensor dot ?

2006-08-24 Thread Simon Burton
>>> numpy.dot.__doc__ matrixproduct(a,b) Returns the dot product of a and b for arrays of floating point types. Like the generic numpy equivalent the product sum is over the last dimension of a and the second-to-last dimension of b. NB: The first argument is not conjugated. Does numpy support sum

Re: [Numpy-discussion] (no subject)

2006-08-24 Thread megu
:―― INFORMATION ―: 不正・悪質なサイトを一切排除しておりますので 安心してご利用ください。 http://love-match.bz/pc/?06 :――: *・゜゜・*:.。. .。.:*・゜゜・*:.。..。:*・゜゜・*:.。..。:**・゜゜・* お金と時間を持て余している人妻の間で、噂になってるあのサイト   [登録・利用料全て無料] http://love-match.bz/pc/?03 ━

Re: [Numpy-discussion] hstack(arr_Int32, arr_float32) fails because of casting rules

2006-08-24 Thread Sebastian Haase
On Thursday 24 August 2006 17:28, Travis Oliphant wrote: > Sebastian Haase wrote: > >Hi, > >I get > >TypeError: array cannot be safely cast to required type > > > >when calling hstack() ( which calls concatenate() ) > >on two arrays being a int32 and a float32 respectively. > > > >I understand no

Re: [Numpy-discussion] users point of view and ufuncs

2006-08-24 Thread Bill Baxter
On 8/24/06, Sasha <[EMAIL PROTECTED]> wrote: > On 8/24/06, Bill Baxter <[EMAIL PROTECTED]> wrote: > >[snip] it would be > > nice to add a concise definition of "ufunc" to the numpy glossary: > > http://www.scipy.org/Numpy_Glossary. > > > > done > > > Can anyone come up with such a definition? > > I

Re: [Numpy-discussion] hstack(arr_Int32, arr_float32) fails because of casting rules

2006-08-24 Thread Travis Oliphant
Sebastian Haase wrote: >Hi, >I get >TypeError: array cannot be safely cast to required type > >when calling hstack() ( which calls concatenate() ) >on two arrays being a int32 and a float32 respectively. > >I understand now that a int32 cannot be safely converted into a float32 >but why does co

Re: [Numpy-discussion] Handling interrupts in NumPy extensions

2006-08-24 Thread Travis Oliphant
David M. Cooke wrote: >On Aug 24, 2006, at 18:38 , Travis Oliphant wrote: > > > >>You can already use the approach suggested: >> >>if (PyOS_InterruptOccurred()) goto error >> >>to handle interrupts. The drawback of this approach is that the loop >>executes more slowly because a check for the in

[Numpy-discussion] hstack(arr_Int32, arr_float32) fails because of casting rules

2006-08-24 Thread Sebastian Haase
Hi, I get TypeError: array cannot be safely cast to required type when calling hstack() ( which calls concatenate() ) on two arrays being a int32 and a float32 respectively. I understand now that a int32 cannot be safely converted into a float32 but why does concatenate not automatically up(?

Re: [Numpy-discussion] Handling interrupts in NumPy extensions

2006-08-24 Thread David M. Cooke
On Aug 24, 2006, at 18:38 , Travis Oliphant wrote: > > You can already use the approach suggested: > > if (PyOS_InterruptOccurred()) goto error > > to handle interrupts. The drawback of this approach is that the loop > executes more slowly because a check for the interrupt occurs many > times

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread Travis Oliphant
Rob Hetland wrote: >In compiling matplotlib and scipy, I get errors complaining about >multiply defined symbols (See below). I tried to fix this with - >multiply_defined suppress but this did not work. Is there a way to >make this go away? > > Can you try current SVN again, to see if it n

Re: [Numpy-discussion] Numpy-discussion Digest, Vol 3, Issue 61

2006-08-24 Thread Paul Midgley
Thanks for your help- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 bas

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread Travis Oliphant
Rob Hetland wrote: >In compiling matplotlib and scipy, I get errors complaining about >multiply defined symbols (See below). I tried to fix this with - >multiply_defined suppress but this did not work. Is there a way to >make this go away? > > define NPY_NO_SIGNAL for now. -Travis ---

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread Rob Hetland
In compiling matplotlib and scipy, I get errors complaining about multiply defined symbols (See below). I tried to fix this with - multiply_defined suppress but this did not work. Is there a way to make this go away? -Rob Scipy error: c++ -bundle -undefined dynamic_lookup build/temp.mac

Re: [Numpy-discussion] Handling interrupts in NumPy extensions

2006-08-24 Thread Travis Oliphant
David Cournapeau wrote: >>>I'm working on some macros that will allow extensions to be >>>"interruptable" (i.e. with Ctrl-C). The idea came from SAGE but the >>>implementation is complicated by the possibility of threads and making >>>sure to handle clean-up code correctly when the interrupt r

[Numpy-discussion] possible bug in C-API

2006-08-24 Thread Sebastian Haase
Hi, I noticed in numpy/numarray/_capi.c: NA_NewAllFromBuffer() a) the original numarray function could create arrays of any (ndim) shape, while PyArray_FromBuffer() looks to me that the returned array is always 1D. b) in the code part npy_intp size = dtype->elsize; for ... size *= self->dim

[Numpy-discussion] (no subject)

2006-08-24 Thread kortmann
>On Thursday 24 August 2006 09:50, [EMAIL PROTECTED] wrote: >> Sorry for my ignorance, but I have not ever heard of or used mingw32. I >> am also using python 2.3. >http://en.wikipedia.org/wiki/Mingw explains in detail. >> >> Is there any way someone could possibly send me a brief walk through o

Re: [Numpy-discussion] (no subject)

2006-08-24 Thread Travis Oliphant
[EMAIL PROTECTED] wrote: >>On Thursday 24 August 2006 09:50, [EMAIL PROTECTED] wrote: >> >> >>>Sorry for my ignorance, but I have not ever heard of or used mingw32. I >>>am also using python 2.3. >>> >>> >>http://en.wikipedia.org/wiki/Mingw explains in detail. >> >> > >$HOME=C:\Doc

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread Travis Oliphant
Albert Strasheim wrote: >Dialog pops up: > >--- >python.exe - Application Error >--- >The exception unknown software exception (0xc029) occurred in the >application at location 0x7c86d474. > > >Click on OK to terminate the program >Click on CANCE

Re: [Numpy-discussion] should a flatiter object get a 'dtype' attribute ?

2006-08-24 Thread Travis Oliphant
Sebastian Haase wrote: >Hi, >I suppose the answer is no . >But converting more code to numpy I got this error >AttributeError: 'numpy.flatiter' object has no attribute 'dtype' >(I found that I did not need the .flat in the first place ) >So I was just wondering if (or how much) a flatiter object

[Numpy-discussion] should a flatiter object get a 'dtype' attribute ?

2006-08-24 Thread Sebastian Haase
Hi, I suppose the answer is no . But converting more code to numpy I got this error AttributeError: 'numpy.flatiter' object has no attribute 'dtype' (I found that I did not need the .flat in the first place ) So I was just wondering if (or how much) a flatiter object should behave like an ndarray

Re: [Numpy-discussion] numpy revision 3056 will not build on RHE3 or Solaris

2006-08-24 Thread Christopher Hanley
Travis, Numpy version '1.0b4.dev3060' will now build on both a 32bit Red Hat Enterprise 3 machine as well as Solaris 8. Chris - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickl

Re: [Numpy-discussion] numpy revision 3056 will not build on RHE3 or Solaris

2006-08-24 Thread Travis Oliphant
Travis Oliphant wrote: > Christopher Hanley wrote: > >> Good Morning, >> >> Numpy revision 3056 will not build on either Red Hat Enterprise 3 or >> Solaris 8. The relevant syntax errors are below: >> >> >> > I'd like to see which platforms do not work with the npy_interrupt.h > stuff.

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread Sebastian Haase
On Thursday 24 August 2006 09:50, [EMAIL PROTECTED] wrote: > Sorry for my ignorance, but I have not ever heard of or used mingw32. I > am also using python 2.3. http://en.wikipedia.org/wiki/Mingw explains in detail. > > Is there any way someone could possibly send me a brief walk through of > ho

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread kortmann
Sorry for my ignorance, but I have not ever heard of or used mingw32. I am also using python 2.3. Is there any way someone could possibly send me a brief walk through of how to install 1.0b3 on windows32? Also I am not sure that I know how to manipulate the code that you guys said that you have

Re: [Numpy-discussion] numpy revision 3056 will not bu ild on RHE3 or Solaris

2006-08-24 Thread Darren Dale
Hi Travis, On Thursday 24 August 2006 12:24, you wrote: > Christopher Hanley wrote: > > Good Morning, > > > > Numpy revision 3056 will not build on either Red Hat Enterprise 3 or > > Solaris 8. The relevant syntax errors are below: > > I'd like to see which platforms do not work with the npy_inte

Re: [Numpy-discussion] numpy revision 3056 will not build on RHE3 or Solaris

2006-08-24 Thread Travis Oliphant
Christopher Hanley wrote: > Good Morning, > > Numpy revision 3056 will not build on either Red Hat Enterprise 3 or > Solaris 8. The relevant syntax errors are below: > > I'd like to see which platforms do not work with the npy_interrupt.h stuff. If you have a unique platform please try the l

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread Travis Oliphant
Frank Conradie wrote: > Thanks Travis - that did the trick. Is this an issue specifically with > mingw and Windows? > Yes, I keep forgetting that Python functions are not necessarily defined at compile time on Windows. It may also be a problem with MSVC on Windows but I'm not sure. The real

Re: [Numpy-discussion] numpy-1.0b3 under windows

2006-08-24 Thread Frank Conradie
Thanks Travis - that did the trick. Is this an issue specifically with mingw and Windows? - Frank Travis Oliphant wrote: Travis Oliphant wrote: Frank Conradie wrote: Hi Sven and Jordan I wish to add my name to this list ;-) I just got the same error trying to

Re: [Numpy-discussion] users point of view and ufuncs

2006-08-24 Thread Sasha
On 8/24/06, Bill Baxter <[EMAIL PROTECTED]> wrote: >[snip] it would be > nice to add a concise definition of "ufunc" to the numpy glossary: > http://www.scipy.org/Numpy_Glossary. > done > Can anyone come up with such a definition? I copied the definition from the old Numeric manual. > Here's m

[Numpy-discussion] numpy revision 3056 will not build on RHE3 or Solaris

2006-08-24 Thread Christopher Hanley
Good Morning, Numpy revision 3056 will not build on either Red Hat Enterprise 3 or Solaris 8. The relevant syntax errors are below: For RHE3: - creating build/temp.linux-i686-2.4 creating build/temp.linux-i686-2.4/numpy creating build/temp.linux-i686-2.4/numpy/core creating build/temp.