Re: [Numpy-discussion] svd + multiprocessing hangs
Am 12.06.2013 19:27, schrieb Julian Taylor: I'm guessing you are using openblas? check with: ls -l /etc/alternatives/libblas.so.3 there are known hanging problems with openblas and multiprocessing. you can work around them by disabling threading in openblas (OPENBLAS_NUM_THREADS=1). Thanks, that works ! Cheers, Uwe. -- Dr. rer. nat. Uwe Schmitt Leitung F/E Mathematik mineway GmbH Gebäude 4 Im Helmerswald 2 66121 Saarbrücken Telefon: +49 (0)681 8390 5334 Telefax: +49 (0)681 830 4376 uschm...@mineway.de www.mineway.de Geschäftsführung: Dr.-Ing. Mathias Bauer Amtsgericht Saarbrücken HRB 12339 signature.asc Description: OpenPGP digital signature ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Strange problem
Hi, I have unreproducable crashes on a customers Win 7 machine with Python 2.7.2 and Numpy 1.6.1. He gets the following message: Problem signature: Problem Event Name: APPCRASH Application Name: python.exe Application Version: 0.0.0.0 Application Timestamp: 4df4ba7c Fault Module Name: umath.pyd Fault Module Version: 0.0.0.0 Fault Module Timestamp: 4e272b96 Exception Code: c005 Exception Offset: 0001983a OS Version: 6.1.7601.2.1.0.256.4 Locale ID: 2055 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 I know that I can not expect a clear answer without more information, but my customer is on hollidays and I just wanted to ask for some hints for possible reasons. The machine is not out of memory and despite this crash runs very stable. Regards, Uwe -- Dr. rer. nat. Uwe Schmitt Leitung F/E Mathematik mineway GmbH Gebäude 4 Im Helmerswald 2 66121 Saarbrücken Telefon: +49 (0)681 8390 5334 Telefax: +49 (0)681 830 4376 uschm...@mineway.de www.mineway.de Geschäftsführung: Dr.-Ing. Mathias Bauer Amtsgericht Saarbrücken HRB 12339 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Strange problem
Am 29.06.2012 10:57, schrieb David Cournapeau: Is this on 32 or 64 bits windows ? Do you know if your customer uses only numpy, or other packages that depend on numpy C extension ? It is 64 bit Windows. I forgot to say that a part of my numpy arrays are generated by a short Cython method wrapping open-ms library. As the code fragment is short, I post it here: def get_peaks(self): cdef _MSSpectrum[_Peak1D] * spec_ = self.inst cdef unsigned int n = spec_.size() cdef np.ndarray[np.float32_t, ndim=2] peaks peaks = np.zeros( [n,2], dtype=np.float32) cdef _Peak1D p cdef vector[_Peak1D].iterator it = spec_.begin() cdef int i = 0 while it != spec_.end(): peaks[i,0] = deref(it).getMZ() peaks[i,1] = deref(it).getIntensity() preincrement(it) i += 1 return peaks I am sure that this functions does not crash during execution. As spec_ 's class is derived from C++ STL std::vector.. there should be no conflict between counting 'i' up to 'n' and testing 'it' against 'spec_.end()'. Regards, Uwe -- Dr. rer. nat. Uwe Schmitt Leitung F/E Mathematik mineway GmbH Gebäude 4 Im Helmerswald 2 66121 Saarbrücken Telefon: +49 (0)681 8390 5334 Telefax: +49 (0)681 830 4376 uschm...@mineway.de www.mineway.de Geschäftsführung: Dr.-Ing. Mathias Bauer Amtsgericht Saarbrücken HRB 12339 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] split matrix
Hi, is there an effective way to remove a row with a given index from a matrix ? Greetings, Uwe -- Dr. rer. nat. Uwe Schmitt FE Mathematik mineway GmbH Science Park 2 D-66123 Saarbrücken Telefon: +49 (0)681 8390 5334 Telefax: +49 (0)681 830 4376 [EMAIL PROTECTED] www.mineway.de Geschäftsführung: Dr.-Ing. Mathias Bauer Amtsgericht Saarbrücken HRB 12339 ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] [mailinglist] How to do: y[yT] = y+T
Nicolas ROUX schrieb: Hello, I hope this is not a silly question ;-) I have a Numpy array, and I want to process it with : if the value is lower than Threshold, then increase by Threshold I would like to translate it as: y[yTreshold] = y + Treshold Hi, your solution does not work, becaus the arrays on both side do not have the same size in generall. You can do it in place: y[yT] += T or explicitely (slower/more memory): y[yT] = y[yT] + T Greetings, Uwe To benefit from the Numpy speed. But this doesn't work, any idea ? Thanks, Cheers, Nicolas. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion -- Dr. rer. nat. Uwe Schmitt FE Mathematik mineway GmbH Science Park 2 D-66123 Saarbrücken Telefon: +49 (0)681 8390 5334 Telefax: +49 (0)681 830 4376 [EMAIL PROTECTED] www.mineway.de Geschäftsführung: Dr.-Ing. Mathias Bauer Amtsgericht Saarbrücken HRB 12339 ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Google Groups
Hi, this mailing list disappeared from google groups. Is there a reason for this ? Did I miss something ? Greetings, Uwe ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Any numpy trick for my problem ?
Hi, I got a matrix of 2100 lines, and I want to calculate blockwise mean vectors. Each block consists of 10 consecutive rows. My code looks like this: rv = [] for i in range(0, 2100, 10): rv.append( mean(matrix[i:i+10], axis=0)) return array(rv) Is there a more elegant and may be faster method to perform this calculation ? Greetings, Uwe ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Any numpy trick for my problem ?
That's cool. Thanks for your fast answer. Greetings, Uwe On 15 Okt., 12:56, Charles R Harris [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 4:47 AM, Uwe Schmitt [EMAIL PROTECTED] wrote: Hi, I got a matrix of 2100 lines, and I want to calculate blockwise mean vectors. Each block consists of 10 consecutive rows. My code looks like this: rv = [] for i in range(0, 2100, 10): rv.append( mean(matrix[i:i+10], axis=0)) return array(rv) Is there a more elegant and may be faster method to perform this calculation ? Something like In [1]: M = np.random.ranf((40,5)) In [2]: M.reshape(4,10,5).mean(axis=1) Out[2]: array([[ 0.57979278, 0.50013352, 0.66783389, 0.4009187 , 0.36379445], [ 0.46938844, 0.34449102, 0.56419189, 0.49134703, 0.61380198], [ 0.5644788 , 0.61734034, 0.3656104 , 0.63147275, 0.46319345], [ 0.56556899, 0.59012606, 0.39691084, 0.26566127, 0.57107896]]) Chuck ___ Numpy-discussion mailing list [EMAIL PROTECTED]://projects.scipy.org/mailman/listinfo/numpy-discussion ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] xml-rpc with numpy arrays
Hi, in order to marshal numpy arrays, you can use the tostring() method. The inverse is the fromstring() function in numpy. But you must know dtype and shape in order to reconstruct your array. Greetings, Uwe On 30 Sep., 19:53, Brian Blais [EMAIL PROTECTED] wrote: Hello, I am trying to use xml-rpc to be able to run some simulations remotely. I am running into a problem with the transfer of numpy arrays. my server code looks like: #!/usr/bin/env python def again(x): # test out the sending of data return [x,x] from SimpleXMLRPCServer import SimpleXMLRPCServer SimpleXMLRPCServer.allow_reuse_address = 1 server = SimpleXMLRPCServer((, 8000)) server.register_function(again) try: print Serving... server.serve_forever() # Start the server finally: print done. server.server_close() my client code looks like: import numpy from xmlrpclib import ServerProxy server=ServerProxy('http://localhost:8000') server.again(5) # this works b=numpy.random.rand(5,5) server.again(b) # this gives an error this gives the error: type 'exceptions.TypeError': cannot marshal type 'numpy.ndarray' objects which seems to be a deficiency of the marshal library, or perhaps I am doing something wrong. Is there a way to fix this? Is there another approach that I should be using? thanks, Brian Blais -- Brian Blais [EMAIL PROTECTED]://web.bryant.edu/~bblais ___ Numpy-discussion mailing list [EMAIL PROTECTED]://projects.scipy.org/mailman/listinfo/numpy-discussion ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Still having issues with f2py
On 11 Sep., 02:33, Blubaugh, David A. [EMAIL PROTECTED] wrote: Mark, ... I was also wondering as to what is involved with compiling with MingW32, by passing -c mingw32 to setup.py.?? If you do not have the right MS compiler on your machine, you can use the mingw port of gcc instead. If you use enthougths edition you already have it, else you have to install the compiler. Passing the compiler option to f2py is easiest if you write your own setup.py Mine look like this: from numpy.distutils.core import Extension import sys ext1 = Extension(name = '_module', sources = ['module.pyf', algorithm.f,]) if __name__ == __main__: from numpy.distutils.core import setup setup(name = 'testdmoude', ext_modules = [ext1,], ) You can call this as follows python setup.py build -cmingw32 Greetings, Uwe ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] cross product of two vectors as sets
Hi, I want to calculate the crossproduct (from set theory, not vectorspace crossproduct) of two vectors x,y. My method is as follows: x = array([1,2,3]) y = array([4,5]) xx, yy = meshgrid(x,y) array(zip(xx.flatten(), yy.flatten())) array([[1, 4], [2, 4], [3, 4], [1, 5], [2, 5], [3, 5]]) I guess there is an easier way to achieve this. Any hints ? Greetings, Uwe ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion