Re: [Numpy-discussion] New numpy functions: filled, filled_like

2013-01-14 Thread Robin
On Mon, Jan 14, 2013 at 2:57 PM, Benjamin Root ben.r...@ou.edu wrote: I am also +1 on the idea of having a filled() and filled_like() function (I learned a long time ago to just do a = np.empty() and a.fill() rather than the multiplication trick I learned from Matlab). However, the collision

Re: [Numpy-discussion] Embedded NumPy LAPACK errors

2013-01-08 Thread Robin
On Sat, Jan 5, 2013 at 1:03 PM, Robin robi...@gmail.com wrote: If not, is there a reasonable way to build numpy.linalg such that it interfaces with MKL correctly ? I managed to get this to work in the end. Since Matlab uses MKL with ILP64 interface it is not possible to get Numpy to use

Re: [Numpy-discussion] Embedded NumPy LAPACK errors

2013-01-05 Thread Robin
EPD which is built against MKL - but I think the problem is that Intel provide two different interfaces - ILP64 with 64 bit integer indices and LP64 with 32 bit integers. Matlab link against the ILP64 version, whereas Enthought use the LP64 version - so there are still incompatible. Cheers Robin

Re: [Numpy-discussion] advanced indexing bug with huge arrays?

2012-01-24 Thread Robin
] and verify that there's a whole lot of 0s in the matrix, specifically, c[574519:].sum() 356.0 c[574520:].sum() 0.0 is the case on Linux 64-bit; is it the case on Windows 64? Yes - I get exactly the same numbers in 64 bit windows with 1.6.1. Cheers Robin

Re: [Numpy-discussion] advanced indexing bug with huge arrays?

2012-01-23 Thread Robin
, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], dtype=uint8) In [41]: a[581350:,0].sum() Out[41]: 0 Cheers Robin Thanks, David On Mon, Jan 23, 2012 at 05:23:28AM -0500, David Warde-Farley wrote: A colleague has run into this weird behaviour with NumPy 1.6.1, EPD 7.1-2, on Linux (Fedora

[Numpy-discussion] upsample or scale an array

2011-12-03 Thread Robin Kraft
='uint8')) 1 loops, best of 3: 27.8 s per loop In this case repeat() peaked at about 1gb of ram usage while np.kron hit about 1.7gb. Thanks again Warren. I'd tried way too many variations on reshape and rollaxis, and should have come to the Numpy list a lot sooner! -Robin On Dec 3, 2011, at 12

Re: [Numpy-discussion] upsample or scale an array

2011-12-03 Thread Robin Kraft
there, but it seems doable. Anyone know what combination of manipulations would work with the result of np.tile? -Robin On Dec 3, 2011, at 11:05 AM, Olivier Delalleau wrote: You can also use numpy.tile -=- Olivier 2011/12/3 Robin Kraft Thanks Warren, this is great, and even handles

Re: [Numpy-discussion] upsample or scale an array

2011-12-03 Thread Robin Kraft
], [1, 1, 2, 2], [3, 3, 4, 4], [3, 3, 4, 4]]]) On Dec. 3, 2011, at 12:50PM, Derek Homeier wrote: On 03.12.2011, at 6:22PM, Robin Kraft wrote: That does repeat the elements, but doesn't get them into the desired order. In [4]: print a [[1 2] [3 4]] In [7

[Numpy-discussion] upsample or scale an array

2011-12-02 Thread Robin Kraft
some combination of np.resize or np.repeat and reshape + rollaxis would do the trick, but I'm at a loss. Many thanks! -Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-10-04 Thread Robin
-threaded) embedded CPython situations, see for example pymex [1] which embeds Python + Numpy in a Matlab mex file and works really well. This seems to a be a problem specific to Jepp. Just wanted to mention it in case it puts someone off trying something unnecessarily in the future. Cheers Robin [1

Re: [Numpy-discussion] f2py and openmp on mac os x with gfortran

2011-07-20 Thread Robin
it by following the symlink that is the gfortran command and looking for an appropriate lib/ directory near the target of that. Cheers Robin On Wed, Jul 20, 2011 at 9:02 PM, Brandt Belson bbel...@princeton.edu wrote: Hello, I'm struggling to create openmp subroutines. I've simplified the problem

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-17 Thread Robin
If I add a 1s sleep in the inner product function shows a much more significant improvement (ie if it were a longer computation): Not threaded: 50.6744170189 Using 8 processes: 8.152393 Still not quite linear but certainly an improvement. Cheers Robin On Thu, Jun 16, 2011 at 9:19 PM, Robin

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-16 Thread Robin
myutil.data = listofdata p = multiprocessing.Pool(8) def mymapfunc(i): return mydatafunc(myutil.data[i]) p.map(mymapfunc, range(len(myutil.data))) Actually that won't work because mymapfunc needs to be in a module so it can be pickled but hopefully you get the idea. Cheers Robin IPs

Re: [Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication

2011-06-16 Thread Robin
. Cheers Robin On Thu, Jun 16, 2011 at 9:05 PM, Brandt Belson bbel...@princeton.edu wrote: Hi all, Thanks for the replies. As mentioned, I'm parallelizing so that I can take many inner products simultaneously (which I agree is embarrassingly parallel). The library I'm writing asks the user

Re: [Numpy-discussion] How to tell if I succeeded to build numpy with amd, umfpack and lapack

2011-02-18 Thread Robin
I think numpy doesn't use umfpack. scipy.sparse used to, but now the umfpack stuff has been moved out to a scikit. So you probably won't see anything about those libraries, but if you install scikits.umfpack and it works then you must be linked correctly. Cheers Robin On Fri, Feb 18, 2011 at 11

Re: [Numpy-discussion] Where did the github numpy repository go?

2010-11-14 Thread Robin Kraft
Git is having some kind of major outage: http://status.github.com/ The site and git access is unavailable due to a database failure. We're researching the issue. On Nov 14, 2010, at 3:29 PM, numpy-discussion-requ...@scipy.org wrote: Message: 5 Date: Sun, 14 Nov 2010 13:29:03 -0700 From:

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-22 Thread Robin
installed components, check that the Microsoft SDK contains the amd64 version of the C/C++ compiler cl.exe. This is usually installed into C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\cl.exe Cheers Robin ___ NumPy-Discussion mailing

Re: [Numpy-discussion] [SciPy-Dev] Good-bye, sort of (John Hunter)

2010-08-18 Thread Robin
On Wed, Aug 18, 2010 at 8:20 AM, Sturla Molden stu...@molden.no wrote: Den 18. aug. 2010 kl. 08.19 skrev Martin Raspaud martin.rasp...@smhi.se: Once upon a time, when my boss wanted me to use matlab, I found myself implementing a python interpreter in matlab... There are just two sane

Re: [Numpy-discussion] f2py performance question from a rookie

2010-08-16 Thread Robin
Robin In the following simple example I am building a tridiagonal array with plain python for loops and by calling a simple fortran subroutine that does the same thing. Here goes the python script: import numpy as np import time import learnf90_05 import sys run = sys.argv[1] try

Re: [Numpy-discussion] summarizing blocks of an array using a moving window

2010-07-22 Thread Robin Kraft
.) multi-dimensional arrays? Stefan's slides are beautiful but my brain starts to hurt if I try to follow them line by line. -Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] summarizing blocks of an array using a moving window

2010-07-21 Thread Robin Kraft
it isn't square and can't be reshaped appropriately (np.tile(np.arange(2**2).reshape(2, 2), 4)): array([[0, 1, 0, 1, 0, 1, 0, 1], [2, 3, 2, 3, 2, 3, 2, 3]]) Inefficient sample code below. Advice greatly appreciated! -Robin import numpy as np from math import sqrt from time import time def rs

Re: [Numpy-discussion] numpy for Python 3?

2010-07-19 Thread Robin
about 2008. http://www.microsoft.com/downloads/details.aspx?familyid=7B0B0339-613A-46E6-AB4D-080D4D4A8C4Edisplaylang=en Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy on windows 64 bit

2010-07-06 Thread Robin
scipy tests) Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] numpy on windows 64 bit

2010-07-05 Thread Robin
Hi, I am having some problems with win64 with all my tests failing. I installed amd64 Python from Python.org and numpy and scipy from http://www.lfd.uci.edu/~gohlke/pythonlibs/ I noticed that on windows sys.maxint is the 32bit value (2147483647 ___

Re: [Numpy-discussion] numpy on windows 64 bit

2010-07-05 Thread Robin
that and the problems with scipy.sparse (spsolve doesn't work) cover all of the errors I'm seeing... (I detailed those in a seperate mail to the scipy list). Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org

Re: [Numpy-discussion] OT: request help building pymex win64

2010-07-03 Thread Robin
with visual studio that were causing the segfaults. Makes me think of the old phrase - problem is between keyboard and chair. Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] OT: request help building pymex win64

2010-07-02 Thread Robin
-into-matlab-mex-win64 Anyway I'm completely in the dark but wondered if some of the experts on here would be able to spot something (perhaps to do with incompatible C runtimes - I am not sure what runtime Python is built with but I thought it was VS 2008). Cheers Robin

Re: [Numpy-discussion] OT: request help building pymex win64

2010-07-02 Thread Robin
/release2009a/win64.html So I thought on the matlab/mex side 2008 should be fine, and I thought since Python is built with 2008 that should also be OK. But obviously something isn't! Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

Re: [Numpy-discussion] Brooken Toolchain (Mac 10.6)

2010-04-20 Thread Robin
To build against the python.org 2.5 you need to use the older gcc: export CC=/usr/bin/gcc-4.0 export CXX=/usr/bin/g++-4.0 should do it. By default snow leopard uses 4.2 now, which doesn't support the -Wno-long-double option used when building python. Cheers Robin On Mon, Apr 19, 2010 at 3:55

Re: [Numpy-discussion] Numpy.dot segmentation fault

2010-01-18 Thread Robin
You can build numpy against Accelerate through macports by specifying the +no_atlas variant. Last time I tried I ran into this issue: http://trac.macports.org/ticket/22201 but it looks like it should be fixed now. Cheers Robin On Mon, Jan 18, 2010 at 8:15 PM, Mark Lescroart lescr...@usc.edu

Re: [Numpy-discussion] 1.4.0 installer fails on OSX 10.6.2

2010-01-08 Thread Robin
Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] ma feature request (log2)

2009-12-13 Thread Robin
Hi, Could we have a ma aware numpy.ma.log2 please, similar to np.ma.log and np.ma.log10? I think it should be as simple as the patch below but perhaps I've missed something: Thanks, Robin --- core.py.orig2009-12-13 15:14:14.0 + +++ core.py 2009-12-13 15:14:53.0

Re: [Numpy-discussion] non-standard standard deviation

2009-11-29 Thread Robin
- see this paper by Travis Oliphant for details: http://hdl.handle.net/1877/438 Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Robin
problem - I will just avoid unloading the mex function (with clear function). But I thought it might be indicative of a memory leak or some other problem since I think in theory it should work (It does if numpy isn't imported). Cheers Robin

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Robin
I forgot to add it doesn't happen if Py_Finalize isn't called - if I take that out and just let the OS/matlab unload the mex function then I can run it many times without the error, but it does leak a bit of memory each time. Cheers Robin On Fri, Nov 13, 2009 at 5:23 PM, Robin robi...@gmail.com

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Robin
I'm trying to embed Python in a MATLAB mex file. I've been coming under some pressure to make my Python code available to my MATLAB colleagues so I am trying to come up with a relatively general way of calling numerical python code from Matlab. I get a similar but different error trying to do

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Robin
function is... but I'm getting a bit out of my depth with linker options, and I guess numpy is always loaded dynamically anyway and will stick around. Easy enough to work around it anyway - but just wanted to check what was going on. Cheers Robin ___ NumPy

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Robin
On Fri, Nov 13, 2009 at 6:50 PM, Pauli Virtanen pav...@iki.fi wrote: Fri, 13 Nov 2009 17:23:19 +, Robin wrote: I'm trying to embed Python in a MATLAB mex file. I've been coming under some pressure to make my Python code available to my MATLAB colleagues so I am trying to come up

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Robin
On Fri, Nov 13, 2009 at 7:48 PM, Sturla Molden stu...@molden.no wrote: Robin skrev: I had assumed when matlab unloads the mex function it would also unload python - but it looks like other dynamic libs pulled in from the mex function (in this case python and in turn numpy) aren't unloaded

Re: [Numpy-discussion] f2py-users list not working

2009-11-04 Thread Robin
to use some other suffix than .f, but I've not tried that. Then f2py file.f That's great thanks very much! It's more or less exactly what I was hoping for. I wonder if it's possible to get distutils to do the preprocess step from a setup.py script? Cheers Robin

[Numpy-discussion] strange performance on mac 2.5/2.6 32/64 bit

2009-11-03 Thread Robin
. But the performance was more or less the same (always several times slower the 32 bit att gfortran). Any advice appreciated. Cheers Robin subroutine bincount (x,c,n,m) implicit none integer, intent(in) :: n,m integer, dimension(0:n-1), intent(in) :: x integer, dimension(0:m-1

Re: [Numpy-discussion] strange performance on mac 2.5/2.6 32/64 bit

2009-11-03 Thread Robin
fortran with f2py from python in a way that doesn't require the code to be changed depending on platform? Or should I just pack it all in and use weave? Robin On Tue, Nov 3, 2009 at 4:29 PM, Robin robi...@gmail.com wrote: Hi, I'm not sure if this is of much interest but it's been really puzzling

Re: [Numpy-discussion] strange performance on mac 2.5/2.6 32/64 bit

2009-11-03 Thread Robin
On Tue, Nov 3, 2009 at 6:14 PM, Robin robi...@gmail.com wrote: After some more pootling about I figured out a lot of the performance loss comes from using 32 bit integers by default when compiles 64 bit. I asked this question on stackoverflow: http://stackoverflow.com/questions/1668899/fortran

[Numpy-discussion] f2py error with -DF2PY_REPORT_ATEXIT

2009-11-03 Thread Robin
the place for f2py tickets? Or is there an obvious fix. Inspecting gfint.so shows the same symbols for both architectures, and _on_exit is listed there with a U which I guess means undefined. Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion

Re: [Numpy-discussion] f2py error with -DF2PY_REPORT_ATEXIT

2009-11-03 Thread Robin
Just noticed this is only supported on linux - sorry for the noise (not having a very good day today!) Robin On Tue, Nov 3, 2009 at 6:47 PM, Robin robi...@gmail.com wrote: Hi, When I try to build a fortran module with f2py from '1.4.0.dev7618' with gfortran 4.2.3 from att.com and apple gcc

[Numpy-discussion] f2py-users list not working

2009-11-03 Thread Robin
I just tried to send the message below to f2py-users - f2py-us...@cens.ioc.ee, but delivery failed. Not sure where else to report this so hopefully here is ok. Cheers Robin -- Forwarded message -- From: Mail Delivery Subsystem mailer-dae...@googlemail.com Date: Tue, Nov 3

Re: [Numpy-discussion] f2py-users list not working

2009-11-03 Thread Robin
supposed to be working. Certainly more traffic more recently than the google group. Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] recommended way to run numpy on snow leopard

2009-10-29 Thread Robin
in the ticket - but it won't be fixed in a release until 2.7. Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] recommended way to run numpy on snow leopard

2009-10-21 Thread Robin
the wx installer to install into the virtualenv). I was wondering what others do? Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] recommended way to run numpy on snow leopard

2009-10-21 Thread Robin
On Wed, Oct 21, 2009 at 10:28 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robin wrote: Hi, I was wondering what the recommended way to run numpy/scipy on mac os x 10.6 is. I understood previously it was recommended to use python.org python and keep everything seperate from

Re: [Numpy-discussion] recommended way to run numpy on snow leopard

2009-10-21 Thread Robin
Thanks... On Wed, Oct 21, 2009 at 11:41 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robin wrote: Thanks - that looks ideal. I take it $HOME/.local is searched first so numpy will be used fromt here in preference to the system numpy. Yes, unless framework-enabled python does

[Numpy-discussion] fortran vs numpy on mac/linux - gcc performance?

2009-10-19 Thread Robin
). Cheers Robin ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] fortran vs numpy on mac/linux - gcc performance?

2009-10-19 Thread Robin
Forgot to include the fortran code used: jm-g26b101:fortran robince$ cat test.f95 subroutine bincount (x,c,n,m) implicit none integer, intent(in) :: n,m integer, dimension(0:n-1), intent(in) :: x integer, dimension(0:m-1), intent(out) :: c integer :: i c = 0 do i = 0,

[Numpy-discussion] extension questions: f2py and cython

2009-10-15 Thread Robin
than np.bincount, but still significantly slower than the fortran. Is this to be expected or am I missing something in the cython? In [14]: timeit ctest.bincount(x,1024) 100 loops, best of 3: 3.31 ms per loop Cheers Robin ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] extension questions: f2py and cython

2009-10-15 Thread Robin
, 2.6 64bit). Is this right, or would different binaries be required for XP, Vista, 7 etc. ? Can anyone point me to a smallish Python package that includes fortran code in this way that I could look to for inspiration? Cheers Robin ___ NumPy-Discussion

Re: [Numpy-discussion] extension questions: f2py and cython

2009-10-15 Thread Robin
to the fortran subroutine - so I wondered how f2py creates it (I think I traced it to array_from_pyobj() but I couldn't really understand what it was doing or whether it would always be zeros). I guess as you say though it is always safer to initialize explicitly Cheers Robin

Re: [Numpy-discussion] Not enough storage for memmap on 32 bit WinXP for accumulated file size above approx. 1 GB

2009-07-27 Thread Robin
or Virtualbox or some other virtualisation software. With recent CPU's there is very little performance penalty (running 32bit on a 64bit host) and it can be very convenient (it is easy to map network drives between guest and host which perform very well since the 'network' is virtual) Cheers Robin

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread Robin
Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] NameError: name 'numeric' is not defined

2009-06-06 Thread Robin
wrong with my build or the current svn state? I am using macports python 2.5.4 on os x 10.5.7 Cheers Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] NameError: name 'numeric' is not defined

2009-06-06 Thread Robin
for the noise... Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Problem with correlate

2009-06-02 Thread Robin
know there isn't really a good answer. There is xcorr in pylab, but it isn't vectorised like xcorr from matlab... Cheers Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] copy and paste arrays from matlab

2009-05-13 Thread Robin
8.177351741233e-01 ; 7.092517323839e-01 9.458774967489e-01 8.595104463863e-01 ] ],[ 4 3 2 ]) Hope someone else finds it useful. Cheers Robin On Tue, May 12, 2009 at 2:12 PM, Robin robi...@gmail.com wrote: [crossposted to numpy-discussion and mlabwrap-user] Hi, I wrote a little utility class

[Numpy-discussion] copy and paste arrays from matlab

2009-05-12 Thread Robin
it pretty painful, so I hope it can be useful to someone else! I will try and do one for Python for copying and pasting to Matlab, but I'm expecting that to be a lot easier! Cheers Robin array.m Description: Binary data ___ Numpy-discussion mailing list

[Numpy-discussion] setterr question

2009-04-29 Thread Robin
session? Thanks Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] setterr question

2009-04-29 Thread Robin
2009/4/29 Stéfan van der Walt ste...@sun.ac.za: 2009/4/29 Robin robi...@gmail.com: I have been using seterr to try to catch where Nans are appearing in my analysis. I used all: 'warn' which worked the first time I ran the function, but as specified in the documentation it only warns 'once

Re: [Numpy-discussion] Built Lapack, Atlas from source.... now numpy.linalg.eig() hangs at 100% CPU

2009-03-28 Thread Robin
). There is some information about this on the wiki: http://scipy.org/ParallelProgramming Cheers Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] indexing question

2009-03-05 Thread Robin
I'm not sure if I can do it without loops. Thanks for any help Cheers Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] indexing question

2009-03-05 Thread Robin
On Thu, Mar 5, 2009 at 10:40 AM, Robin robi...@gmail.com wrote: Hi, I have an indexing problem, and I know it's a bit lazy to ask the list, sometime when people do interesting tricks come up so I hope no one minds! I have a 2D array X.shape = (a,b) and I want to change it into new array

Re: [Numpy-discussion] indexing question

2009-03-05 Thread Robin
On Thu, Mar 5, 2009 at 10:40 AM, Robin robi...@gmail.com wrote: Hi, I have an indexing problem, and I know it's a bit lazy to ask the list, sometime when people do interesting tricks come up so I hope no one minds! I have a 2D array X.shape = (a,b) and I want to change it into new array

Re: [Numpy-discussion] indexing question

2009-03-05 Thread Robin
On Thu, Mar 5, 2009 at 10:57 AM, Robin robi...@gmail.com wrote: On Thu, Mar 5, 2009 at 10:40 AM, Robin robi...@gmail.com wrote: Hi, I have an indexing problem, and I know it's a bit lazy to ask the list, sometime when people do interesting tricks come up so I hope no one minds! I have a 2D

Re: [Numpy-discussion] indexing question

2009-03-05 Thread Robin
On Thu, Mar 5, 2009 at 9:15 PM, Stéfan van der Walt ste...@sun.ac.za wrote: Hi Robin 2009/3/5 Robin robi...@gmail.com: On Thu, Mar 5, 2009 at 10:57 AM, Robin robi...@gmail.com wrote: On Thu, Mar 5, 2009 at 10:40 AM, Robin robi...@gmail.com wrote: Hi, I have an indexing problem, and I know

Re: [Numpy-discussion] 64-bit numpy questions?

2009-03-03 Thread Robin
any problem (except for the machine running out of memory :) Cheers Robin Cheers, Todd ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] ParallelProgramming wiki page

2008-10-27 Thread Robin
Hi, I made some changes to the ParallelProgramming wiki page to outline use of the (multi)processing module as well as the threading module. I'm very much not an expert on this - just researched it for myself, so please feel free to correct/ extend/ delete as appropriate. Robin

Re: [Numpy-discussion] ParallelProgramming wiki page

2008-10-27 Thread Robin
if numpy builds with that, so maybe we should take that reference out. Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] funny matrix product calculation

2008-09-15 Thread Robin
Success in business appears to be elusive for many people. So what is it that makes people successful? http://www.bestentrepreneur.net/2008/02/want-to-know-billionaires-formula.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: [Numpy-discussion] profiling line by line

2008-09-15 Thread Robin
an afternoon of refactoring everything into tiny functions to get anything useful out of the normal profiler and see where the bottleneck in my code was. Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo

Re: [Numpy-discussion] concatenate an array with a number

2008-08-04 Thread Robin
ndmin, numpy still complains.) I think r_[x[0],x] will do you what you want... Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Sparse Matrices in Numpy -- (with eigenvalue algorithms if possible)

2008-06-23 Thread Robin
but installation is probably simpler following the instructions on the wiki to use the apple one... Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Which Python to Use on OSX, Was: 1.1.0 OSX Installer Fails Under 10.5.3?

2008-06-04 Thread Robin
alone - and installing the python.org for everyday use. The only problem with this is that the system python works with dtrace while the normal one doesn't... Cheers Robin I guess I always feel a sense of uncertainty with having two separate Python installations as to which actually gets used

Re: [Numpy-discussion] Which Python to Use on OSX, Was: 1.1.0 OSX Installer Fails Under 10.5.3?

2008-06-04 Thread Robin
On Wed, Jun 4, 2008 at 10:59 AM, David Cournapeau [EMAIL PROTECTED] wrote: Robin wrote: I think theres much less chance of problems using the system python for system things and leaving it well alone - and installing the python.org for everyday use. The only problem

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Robin
] and element [0,1]. Hope this helps, Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Robin
On Fri, May 30, 2008 at 12:57 AM, Robin [EMAIL PROTECTED] wrote: You are indexing here with a 1d list [0,1]. Since you don't provide a column index you get rows 0 and 1. If you do a[ [0,1] , [0,1] ] then you get element [0,0] and element [0,1]. Whoops - you get [0,0] and [1,1]. Robin

Re: [Numpy-discussion] Fancier indexing

2008-05-22 Thread Robin
occurrence of i at a position p contributes weights[p] instead of 1. See also: histogram, digitize, unique. Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Quick Question about Optimization

2008-05-19 Thread Robin
take the (1-)'s outside of the loop although again I'm not sure how much difference it would make. So sorry I can't give any concrete advise but I hope I've given some ideas... Cheers Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] Quick Question about Optimization

2008-05-19 Thread Robin
Also you could use xrange instead of range... Again, not sure of the size of the effect but it seems to be recommended by the docstring. Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] Quick Question about Optimization

2008-05-19 Thread Robin
of methods to speed up python code (incuding weave.blitz), which has Hoyt says would be ideal in this case: http://scipy.org/PerformancePython Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

[Numpy-discussion] python memory use

2008-05-03 Thread Robin
/Cookbook/Python/Recipe/511474 which does wonders for my code. I was wondering if this function should be included in Numpy as it seems to provide an important feature, or perhaps an entry on the wiki (in Cookbook section?) Thanks, Robin ___ Numpy-discussion

Re: [Numpy-discussion] Numpy/Cython Google Summer of Code project idea

2008-03-07 Thread Robin
On Fri, Mar 7, 2008 at 9:06 AM, Fernando Perez [EMAIL PROTECTED] wrote: Hi Robin, As Ondrej pointed out, the expectation is a full-time commitment to the project. Other than that it sounds like you might be able to participate, and it's worth noting that this being open source, if you

Re: [Numpy-discussion] numpy.ndarray constructor from python list: bug?

2008-03-06 Thread Robin
a as an array with more than one element. I think the array constructor expects lists of numbers, not of arrays etc. To do what you want try b = r_[1,2,a] c = r_[a,1,2] which works for a an array (and of more than one element). Cheers Robin ___ Numpy

Re: [Numpy-discussion] Numpy/Cython Google Summer of Code project idea

2008-03-06 Thread Robin
that interested students like myself can apply. Thanks, Robin PS My nick on IRC is 'thrope' and I try to hang out in there most of the time I am online. I am also on Google Talk at this email address. ___ Numpy-discussion mailing list Numpy-discussion

Re: [Numpy-discussion] image to array doubt

2008-02-29 Thread Robin
128 makes unsigned again in [0,256]. I'm not sure why they would be doing this - to me it looks they might be using Image as a convenient way to store some other kind of data... HTH, Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Robin
interactively in Ipython, you can do %who ndarray or %whos ndarray to get a list of arrays. It might be possible to get this functionality within a script/program through the ipython api, but I'm afraid I don't know much about that. Cheers, Robin ___ Numpy

Re: [Numpy-discussion] searchsorted bug

2008-01-31 Thread Robin
I do get the problem with a recent(ish) svn, on OS X 10.5.1, python 2.5.1 (from python.org): In [76]: A = array(['a','aa','b']) In [77]: B = array(['d','e']) In [78]: A.searchsorted(B) Out[78]: array([3, 0]) In [79]: numpy.__version__ Out[79]: '1.0.5.dev4722'

Re: [Numpy-discussion] argsort memory problem?

2008-01-29 Thread Robin
2.5.1 (not apple one) Numpy 1.0.5.dev4722 Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Test failure with latest SVN

2008-01-16 Thread Robin
ValueError: array must not contain infs or NaNs -- Ran 713 tests in 0.697s FAILED (errors=1) Out[3]: unittest._TextTestResult run=713 errors=1 failures=0 Robin ___ Numpy-discussion

[Numpy-discussion] test failure: Ticket 396

2007-11-16 Thread Robin
must not contain infs or NaNs ValueError: array must not contain infs or NaNs -- Ran 692 tests in 0.456s FAILED (errors=1) Out[2]: unittest._TextTestResult run=692 errors=1 failures=0 Thanks, Robin

Re: [Numpy-discussion] Memory leak in ndarray

2007-10-26 Thread Robin
I can confirm the same behaviour with numpy '1.0.4.dev4271' on OS X 10.4with python 2.5.1 (installer from python.org). For me the memory used by the python process grows at about 1MB/sec. The memory isn't released when the loop is canceled. ___

Re: [Numpy-discussion] fortran 90 compiler problem

2007-10-10 Thread Robin
fine, but otherwise it doesn't seem to work (even with --fcompiler=gnu95 etc) Cheers Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] diff of find of diff trick

2007-10-09 Thread Robin
(find([1;dtemp])); indx = temp(dtemp0); Pr(indx)= count ./ numel(data);% probability Thanks Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] dot product not behaving as expected

2007-10-08 Thread Robin
.], [ 160.], [ 20.]]) In [157]: numpy.dot(x,y) Out[157]: array([[ 64.]]) In [158]: sum(x*y.T) Out[158]: 55924.0 Am I missing something? Thanks, Robin ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http

  1   2   >