Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-12 Thread Christopher Barker
for working in this! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-12 Thread Christopher Barker
Vincent Davis wrote: Ok, Friedrich and I are working on setting up a machine for building on 10.5 and hope (I do) to have that going for 1.5.1rc1 I hope to do a 10.6 for 1.5rc1 also. why have a separate 10.6 build? And have we given up on 10.4? -Chris -- Christopher Barker, Ph.D

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-12 Thread Christopher Barker
one anymore, we're not allowed to have them on our network, since Apple stopped supplying security patches) Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-13 Thread Christopher Barker
As for Python 3k -- I have no idea! I might be able to do the 10.5 builds -- but I don't know for how long. Do you have the machines (or VMs) to do that? Thanks so much! NOTE: are there buildbots somewhere that could be used for this? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-13 Thread Christopher Barker
or hidden setup.py) I don't know if you can embed a setup.py in a mpkg, but I wouldn't bother, with all the binary compatibility issues, this will be an installer designed for a particular python install, anyway. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-13 Thread Christopher Barker
a pain -- how I long for open sourceBut I think I have a 104 Intel DVD at home, let me know if I should look for it. (I'm running 10.5 on that machine, now) What is the best way to test them? Try to install and run numpy.test() ? That's about all I know how to do. -CHB -- Christopher

Re: [Numpy-discussion] Need help for the migration from Numeric to numpy

2010-10-14 Thread Christopher Barker
you understand what the script did. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-14 Thread Christopher Barker
? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] Need help for the migration from Numeric to numpy

2010-10-14 Thread Christopher Barker
think once you get started. You'd want a multiple-file search and replace tool, though. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-15 Thread Christopher Barker
wheel 8190646 Oct 14 21:33 numpy-2.0.0.dev-py2.5-python.org.dmg Can I find that somewhere to download and test? This is py2.5 on Mac OS X 10.5. good start. Thanks again for all your work on this, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR

Re: [Numpy-discussion] help from OS X 10.5 users wanted

2010-10-15 Thread Christopher Barker
, but that sounds like a great option. And thanks for PIL and MPL, too! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread Christopher Barker
').readlines()[0] Out[1]: ';\r\n' that's what the 'U' is for. try: open('tools/win32build/nsis_scripts/numpy-superinstaller.nsi.in','rU').readlines()[0] -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526

Re: [Numpy-discussion] problem with a binary file on OS X 10.6

2010-11-05 Thread Christopher Barker
and dtype='i4' for little endian. Intel is little endian, PPC is bigendian (I think -- do test to make sure!) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle

Re: [Numpy-discussion] Change in Python/Numpy numerics with Py version 2.6 ?

2010-11-12 Thread Christopher Barker
* import numpy as np is the most common way to import numpy these days -- yes it reasults in a bit of extra typing, but namespaces are one honking great idea: http://www.python.org/dev/peps/pep-0020/ -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-12 Thread Christopher Barker
-- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ NumPy

Re: [Numpy-discussion] Implementing __format__

2010-11-15 Thread Christopher Barker
in numpy to handle better than python (in string parsing, anyway). -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception

Re: [Numpy-discussion] seeking advice on a fast string-array conversion

2010-11-16 Thread Christopher Barker
-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception

Re: [Numpy-discussion] seeking advice on a fast string-array conversion

2010-11-16 Thread Christopher Barker
into arrays of floats or doubles (using fscanf). I'd be curious how the performance compares to what you've got. Let me know if you're interested. I'm curious, yes. OK -- I'll whip up a test similar to yours -- stay tuned! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency

Re: [Numpy-discussion] seeking advice on a fast string-array conversion

2010-11-16 Thread Christopher Barker
On 11/16/10 10:01 AM, Christopher Barker wrote: OK -- I'll whip up a test similar to yours -- stay tuned! Here's what I've done: import numpy as np from maproomlib.utility import file_scanner def gen_file(): f = file('test.dat', 'w') for i in range(1200): f.write('1 ' * 2048

Re: [Numpy-discussion] How to import input data to make ndarray for batch processing?

2010-11-18 Thread Christopher Barker
like this. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] [ANN] Nanny, faster NaN functions

2010-11-19 Thread Christopher Barker
for contiguous arrays. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] indexing question

2010-11-22 Thread Christopher Barker
for: In [1]: import numpy as np In [2]: a = np.arange(12) In [3]: a.shape = (3,2,2) In [4]: a Out[4]: array([[[ 0, 1], [ 2, 3]], [[ 4, 5], [ 6, 7]], [[ 8, 9], [10, 11]]]) In [5]: a[:,1,0] Out[5]: array([ 2, 6, 10]) -- Christopher Barker

Re: [Numpy-discussion] ANN: NumPy 1.5.1

2010-11-22 Thread Christopher Barker
thanks to the team that build the OS-X binaries -- looks like a complete set! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317

Re: [Numpy-discussion] How to export a CObject from NumPy to my own module?

2010-11-24 Thread Christopher Barker
build-in understanding of numpy arrays. It can call arbitrary C code so there are no limits to its functionality, but it will save you much pain in reference coutning, converting to/from python objects, etc. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Christopher Barker
it would be too hard, though. I've enclosed some test code, and my accumulator class, in case you find it useful. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Christopher Barker
On 12/6/10 11:00 AM, Benjamin Root wrote: numpy.lib.recfunctions has a method for easily adding new columns. cool! There is a lot of other nifty- looking stuff in there too. The OP should really take a look. And maybe an appending function is in order, too. -Chris -- Christopher Barker

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Christopher Barker
performance issues -- though re-allocating data is pretty fast, too -- maybe it won't matter. If it does, consider the accumulator code I sent, or use it as inspiration to write your own. If you do improve it, please send your improvements back to me. -Chris -- Christopher Barker, Ph.D

Re: [Numpy-discussion] Installing on CentOS 5 claims invalid Python installation

2010-12-23 Thread Christopher Barker
should do for numpy. HTH, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] numpy.append numpy.where vs list.append and brute iterative for loop

2011-01-27 Thread Christopher Barker
know 'till you profile. See the enclosed code and figures. Interestingly both appear to be pretty linear, though the constant is Much larger for numpy arrays. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice

Re: [Numpy-discussion] Developer NumPy list versus User NumPy list

2011-01-27 Thread Christopher Barker
I'll subscribe to both lists anyway, and filter them to the same place in my email. So it makes little difference to me. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax

Re: [Numpy-discussion] numpy.append numpy.where vs list.append and brute iterative for loop

2011-01-27 Thread Christopher Barker
, experimentally, appending numpy arrays (on that one simple example) appeared to be O(N). Granted, a much larger constant that for lists, but it sure looks linear to me. Should it be O(N^2)? Maybe I need to run it for larger N , but I got impatient as it is. -Chris -- Christopher Barker, Ph.D

Re: [Numpy-discussion] create a numpy array of images

2011-01-28 Thread Christopher Barker
this in 3D. you'll have to see what visvis is expecting in terms of data types, etc. HTH, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526

Re: [Numpy-discussion] using loadtxt() for given number of rows?

2011-01-31 Thread Christopher Barker
is whitespace, which it was in your example. But if it does, it should be pretty fast. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Christopher Barker
-- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] create a numpy array of images

2011-02-01 Thread Christopher Barker
by a integer amount (i.e a factor of 2) in each dimension, I have some Cython code that optimizes that. I'm happy to send it along. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526

Re: [Numpy-discussion] create a numpy array of images

2011-02-02 Thread Christopher Barker
is meant for geo-referenced data, but you can ignore the geo information and just get an image if you want. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115

Re: [Numpy-discussion] using loadtxt() for given number of rows?

2011-02-14 Thread Christopher Barker
a number of rows as an optional parameter. not a big deal, now that we have list comprehensions, but still it would be nice, and it makes sense to put it into loadtxt() for sure. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526

Re: [Numpy-discussion] conditional array indexing

2011-02-14 Thread Christopher Barker
]]) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] How to get the prices of Moving Averages Crosses?

2011-03-01 Thread Christopher Barker
-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception

Re: [Numpy-discussion] Numpy 1.6 schedule

2011-03-07 Thread Christopher Barker
, then it shouldn't be changed, but I think it better reflects what dtypes are all about. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317

[Numpy-discussion] ragged array implimentation

2011-03-07 Thread Christopher Barker
? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] ragged array implimentation

2011-03-07 Thread Christopher Barker
On 3/7/11 9:33 AM, Francesc Alted wrote: A Monday 07 March 2011 18:28:11 Christopher Barker escrigué: I'm setting out to write some code to access and work with ragged arrays stored in netcdf files. It dawned on me that ragged arrays are not all that uncommon, so I'm wondering if any of you

Re: [Numpy-discussion] ragged array implimentation

2011-03-07 Thread Christopher Barker
(and hence NetCDF4) is that they cannot be compressed (but that should be addressed in the future). good to know. Thanks to both you and Jeff, This has given me some things to ponder. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526

Re: [Numpy-discussion] rewriting NumPy code in C or C++ or similar

2011-03-07 Thread Christopher Barker
dependencies -- or at least have something you could compile and run without a python interpreter running. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115

Re: [Numpy-discussion] ragged array implimentation

2011-03-10 Thread Christopher Barker
On 3/7/11 5:51 PM, Sturla Molden wrote: Den 07.03.2011 18:28, skrev Christopher Barker: 1, 2, 3, 4 5, 6 7, 8, 9, 10, 11, 12 13, 14, 15 ... A ragged array, as implemented in C++, Java or C# is just an array of arrays (or 'a pointer to an array of pointers'). Sure, but as a rule I don't

Re: [Numpy-discussion] ragged array implimentation

2011-03-10 Thread Christopher Barker
On 3/10/11 9:51 AM, Francesc Alted wrote: A Thursday 10 March 2011 18:05:11 Christopher Barker escrigué: NOTE: this looks like it could use a growable numpy array, much like one I've written before -- maybe it's time to revive that project and use it here, fixing some performance issues while

Re: [Numpy-discussion] ragged array implimentation

2011-03-10 Thread Christopher Barker
On 3/10/11 11:29 AM, Christopher Barker wrote: By the way, it would be great to have a growable array that could be efficiently used in Cython code -- so you could accumulate a bunch of native C datatype data easily. I just noticed that carray is written in Cython, so that part should be easy

Re: [Numpy-discussion] ragged array implimentation

2011-03-12 Thread Christopher Barker
, and I'm looking forward to seeing what's next for carray! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-15 Thread Christopher Barker
, use Python. And the fact that using all these in the same program is pretty easy makes it all possible. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA

Re: [Numpy-discussion] *= operator not intuitive

2011-03-16 Thread Christopher Barker
casting to occur. I think this is the kind of thing that would be great to have a warning the first time you do it, but once you understand, the warnings would be really, really annoying! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206

Re: [Numpy-discussion] avoid a line...

2011-03-17 Thread Christopher Barker
0.8 0.55.51.50.5 1.5 It's not as robust, but if performance matters, fromfile() should be faster: f.readline() # to skip the first line arr = np.fromfile(f, sep=' ', dtype=np.float64).reshape((-1, 5)) (untested) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency

Re: [Numpy-discussion] hashing dtypes, new variation, old theme

2011-03-17 Thread Christopher Barker
On 3/17/11 2:57 PM, Mark Wiebe wrote: Dtypes being mutable looks like a serious bug to me, it's violating the definition of 'hashable' given here: I can imagine other problems is would cause, as well -- is there any reason that dtypes should be mutable? -Chris -- Christopher Barker, Ph.D

Re: [Numpy-discussion] Nonzero behaving strangely?

2011-03-17 Thread Christopher Barker
, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], dtype=bool) that's a boolean array that can be used for indexing, operating with where, etc. HTH, -Chris -- Christopher Barker, Ph.D. Oceanographer

Re: [Numpy-discussion] fast robus implementation of float()

2011-03-22 Thread Christopher Barker
function written for numpy to handle things like that. Of course, this is easy to wrap in a small function but I expect it to be slow when the input size is in the Mb range. Never expect -- do a simple solution, then see if it's too slow for youre needs. -Chris -- Christopher Barker, Ph.D

[Numpy-discussion] Scientific Software developer wanted in Seattle.

2011-03-23 Thread Christopher Barker
being hired by GDIT to work with NOAA, so any questions about salary, benefits, etc, etc should go to GDIT. However, feel free to send me questions about our organization, working conditions, more detail about the nature of the projects etc. -Chris -- Christopher Barker, Ph.D. Oceanographer

Re: [Numpy-discussion] Array views

2011-03-26 Thread Christopher Barker
to work with data laid out like this. HTH, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] Array views

2011-03-26 Thread Christopher Barker
: http://www.seapig.org/November2010Notes -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] Old tickets

2011-03-31 Thread Christopher Barker
, but diverges from the behavior of python's operator. I think consistency within numpy is more important that consistency with python -- I expect differences like this from python (long integers, different data types, etc) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response

Re: [Numpy-discussion] Willing to contribute to SciPy NumPy ...

2011-03-31 Thread Christopher Barker
something to contribute. -Chris Do check out the developer zone, maybe search the the open tickets and see if there are any bugs you want to tackle. Maybe write some tests for untested code you find. Good ideas as well, of course. -Chris -- Christopher Barker, Ph.D. Oceanographer

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 2

2011-04-05 Thread Christopher Barker
to: - will having an extra \r with Windows files hurt anything? -- probably not. - Are there many mac-style text files out there anymore? not many. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206

[Numpy-discussion] convert array to tuples?

2011-04-05 Thread Christopher Barker
be slower than it should be (to be honest, not profiled). Is there a faster way? Maybe numpy should have a ndarray.totuple() method. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206

Re: [Numpy-discussion] convert array to tuples?

2011-04-05 Thread Christopher Barker
-- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ NumPy-Discussion

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 2

2011-04-05 Thread Christopher Barker
right, but that's better than barfing. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 2

2011-04-06 Thread Christopher Barker
Sorry to keep harping on this, but for history's sake, I was one of the folks that got 'U' introduced in the first place. I was dealing with a nightmare of unix, mac and dos test files, 'U' was a godsend. On 4/5/11 4:51 PM, Matthew Brett wrote: The difference between 'rt' and 'U' is (this is

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 2

2011-04-06 Thread Christopher Barker
-- there is a bit more bookeeping code to be written. DARN -- I think I said my last note was the last on this topic! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA

Re: [Numpy-discussion] Rounding the decimal part of a real number

2011-04-06 Thread Christopher Barker
) Out[110]: '1.235' HTH, Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] Array of size 'n' with common difference 1

2011-04-29 Thread Christopher Barker
: In [20]: np.mgrid[-1:3.25:.25] Out[20]: array([-1. , -0.75, -0.5 , -0.25, 0. , 0.25, 0.5 , 0.75, 1. , 1.25, 1.5 , 1.75, 2. , 2.25, 2.5 , 2.75, 3. ]) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959

Re: [Numpy-discussion] Array of size 'n' with common difference 1

2011-04-29 Thread Christopher Barker
)] which is klunkier that linspace. I'd have used two different function names for the different mgrid functionality, rather that than the complex kludge -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point

Re: [Numpy-discussion] Less dimensions than expected with record array

2011-05-02 Thread Christopher Barker
. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] Numpy question

2011-05-27 Thread Christopher Barker
begin to figure out what's wrong. Good luck, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] finding elements that match any in a set

2011-05-27 Thread Christopher Barker
never noticed that before. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

[Numpy-discussion] what does in do with numpy arrays?

2011-05-31 Thread Christopher Barker
, 2, 3] in A Out[]: False In []: [3, 2, 1] in A Out[]: True So, obviously the logic behind __contains__ is not so very straightforward. Perhaps just a bug? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600

Re: [Numpy-discussion] New functions.

2011-06-01 Thread Christopher Barker
.) I don't see how that is particularly useful, at least not any more useful that nanprod, nandiv, etc, etc... What am I missing? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329

Re: [Numpy-discussion] np.histogram: upper range bin

2011-06-02 Thread Christopher Barker
to be more explicit: In [14]: np.histogram(x, bins=np.linspace(0.5, 4.5, 5)) Out[14]: (array([1, 1, 1, 1]), array([ 0.5, 1.5, 2.5, 3.5, 4.5])) HTH, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way

Re: [Numpy-discussion] fixing up datetime

2011-06-02 Thread Christopher Barker
to use, and a well specified way to define new ones. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar

Re: [Numpy-discussion] fixing up datetime

2011-06-02 Thread Christopher Barker
, and how at least one well-respected group has addresses these issues. http://www.earthsystemmodeling.org/esmf_releases/non_public/ESMF_5_1_0/ESMC_crefdoc/node6.html (If that long URL breaks, I found that by googling: ESMF calendar date time) -Chris -- Christopher Barker, Ph.D. Oceanographer

Re: [Numpy-discussion] fixing up datetime

2011-06-02 Thread Christopher Barker
-- which could be represented in hours, minutes, seconds, etc? What I'm getting at is that the difference between calendars is in what timedeltas mean, not what a unit in time is. ISO8601 seems quite OK. All that does is specify a string representation, no? -Chris -- Christopher Barker, Ph.D

Re: [Numpy-discussion] fixing up datetime

2011-06-02 Thread Christopher Barker
we come up with needs to be clearly defined. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar

Re: [Numpy-discussion] fixing up datetime

2011-06-06 Thread Christopher Barker
calendar, and what calendar you are using, should be kept clearly distinct. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main

Re: [Numpy-discussion] fixing up datetime

2011-06-07 Thread Christopher Barker
performance issues that may not make that possible, but I still like it. maybe two types: datetime_calendar: for Calendar-type units (months, business days, ...) datetime_continuous: for linear units (seconds, hours, ...) or something like that? -Chris -- Christopher Barker, Ph.D

Re: [Numpy-discussion] fixing up datetime

2011-06-07 Thread Christopher Barker
that is happening, and the user needs to have a clear and ideally easy way to define how it should happen. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115

Re: [Numpy-discussion] numpy c api general array handling

2011-06-08 Thread Christopher Barker
/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion -- Christopher Barker

Re: [Numpy-discussion] fixing up datetime

2011-06-09 Thread Christopher Barker
the only one that has brought up science use, and that only barely (and mostly the simple cases). So do we really need to have the same dtype useful for finance and particle physics? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR

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

2011-06-09 Thread Christopher Barker
() for that? If so, then the above applies to that as well. I know I could look at your code to answer these questions, but I thought this might help. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206

Re: [Numpy-discussion] code review for datetime arange

2011-06-09 Thread Christopher Barker
to increments of days? of course, I've lost track of the difference between 'M' and 'M8' (I've never liked the dtype code anyway -- I far prefer np.float64 to 'd', for instance) Will there be a linspace for datetimes? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA

Re: [Numpy-discussion] np.histogram: upper range bin

2011-06-13 Thread Christopher Barker
specify the correct range, but wouldn't it be preferable if the function provided a warning when this case occurs ? --- Re: [Numpy-discussion] np.histogram: upper range bin Christopher Barker Thu, 02 Jun 2011 09:19:16 -0700 Peter Butterworth wrote: in np.histogram the top-most bin edge

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

2011-06-13 Thread Christopher Barker
need. Thanks again, Brandt Message: 1 Date: Thu, 09 Jun 2011 13:11:40 -0700 From: Christopher Barker chris.bar...@noaa.gov mailto:chris.bar...@noaa.gov Subject: Re: [Numpy-discussion] Using multiprocessing (shared memory

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

2011-06-15 Thread Christopher Barker
!) -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

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

2011-06-16 Thread Christopher Barker
here. I wonder if it's just array size though -- won't cPickle time scale with array size? So it may not be size pe-se, but rather how much computation you need for a given size array. -Chris [I've enclosed the OP's slightly altered code] -- Christopher Barker, Ph.D. Oceanographer Emergency

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

2011-06-16 Thread Christopher Barker
Sturla Molden wrote: On Windows this sucks, because there is no fork system call. Darn -- I do need to support Windows. Here we are stuck with multiprocessing and pickle, even if we use shared memory. What do you need to pickle if you're using shared memory? -Chris -- Christopher

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

2011-06-16 Thread Christopher Barker
. Which by the way is what the shared memory arrays I and Gaël made will do, but we still have the annoying pickle overhead. Do you have a pointer to that code? It sounds handy. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959

[Numpy-discussion] get a dtypes' range?

2011-06-17 Thread Christopher Barker
a_dtype.min_value etc. In this case, I have a uint16, so I can hard code it, but it would be nice to be able to be write the code in a more generic fashion. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand

Re: [Numpy-discussion] get a dtypes' range?

2011-06-17 Thread Christopher Barker
(or placeholders, anyway), which I don't quite get. oh well, I've found what I need, thanks. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526

Re: [Numpy-discussion] get a dtypes' range?

2011-06-17 Thread Christopher Barker
Robert Kern wrote: On Fri, Jun 17, 2011 at 13:27, Christopher Barker chris.bar...@noaa.gov wrote: Actually, I'm a bit confused about dtypes from an OO design perspective anyway. I note that the dtypes seem to have all (most?) of the methods of ndarrays (or placeholders, anyway), which I

Re: [Numpy-discussion] fast grayscale conversion

2011-06-20 Thread Christopher Barker
-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception

Re: [Numpy-discussion] fast numpy i/o

2011-06-21 Thread Christopher Barker
(but not a standard outside of numpy). I doubt pickle will ever be your best bet. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main

Re: [Numpy-discussion] fast numpy i/o

2011-06-21 Thread Christopher Barker
have a way to specify what is in the file. speaking of hdf5, I see: pyhdf5io 0.7 - Python module containing high-level hdf5 load and save functions. h5py 2.0.0 - Read and write HDF5 files from Python There is also pytables, which uses HDF5 under the hood. -Chris -- Christopher

Re: [Numpy-discussion] fast numpy i/o

2011-06-21 Thread Christopher Barker
to take any of this on anyway. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Christopher Barker
in mind. Isn't that what the PEP 3118 extended buffer protocol is supposed to be for? Anyway, good stuff! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-24 Thread Christopher Barker
be that you can mask and unmask a value for different operations, without losing the value. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526

  1   2   3   4   5   6   7   >