Francesc Alted | 7 Jul 20:20 2014
Picon

ANN: python-blosc 1.2.7 released

=============================
Announcing python-blosc 1.2.4
=============================

What is new?
============

This is a maintenance release, where included c-blosc sources have been
updated to 1.4.0.  This adds support for non-Intel architectures, most
specially those not supporting unaligned access.

For more info, you can have a look at the release notes in:

https://github.com/Blosc/python-blosc/wiki/Release-notes

More docs and examples are available in the documentation site:

http://python-blosc.blosc.org

What is it?
===========

Blosc (http://www.blosc.org) is a high performance compressor
optimized for binary data.  It has been designed to transmit data to
the processor cache faster than the traditional, non-compressed,
direct memory fetch approach via a memcpy() OS call.

Blosc is the first compressor that is meant not only to reduce the size
of large datasets on-disk or in-memory, but also to accelerate object
manipulations that are memory-bound
(Continue reading)

Charles R Harris | 7 Jul 07:53 2014
Picon

1.10-devel is open

Just so. The fixes for 1.9.0b1 are now in that branch ready for the next beta.

Chuck
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Eric Firing | 7 Jul 04:59 2014

Re: Short-hand array creation in `numpy.mat` style

On 2014/07/06, 4:27 PM, Alexander Belopolsky wrote:
>
> On Sun, Jul 6, 2014 at 6:06 PM, Eric Firing <efiring <at> hawaii.edu
> <mailto:efiring <at> hawaii.edu>> wrote:
>
>       (I'm not entirely convinced
>     np.arr() is a good idea at all; but if it is, it must be kept simple.)
>
>
> If you are going to introduce this functionality, please don't call it
> np.arr.
>
> Right now, np.a<tab> presents you with a whopping 53 completion choices.
>   Adding "r", narrows that to 21, but np.arr<tab> completes to np.array
> right away.  Please don't introduce another bump in this road.
>
> "Namespaces are one honking great idea -- let's do more of those!"
>
> I would suggest calling it something like np.array_simple or
> np.array_from_string, but the best choice IMO, would be
> np.ndarray.from_string (a static constructor method).

I think the problem is that this defeats the point: minimizing typing 
when doing an off-the-cuff demo or test.  I don't know that this use 
case justifies the clutter, regardless of what it is called; but 
evidently there is some demand for it.

Eric

>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
Daniel da Silva | 6 Jul 22:35 2014
Picon

Short-hand array creation in `numpy.mat` style

The idea is that there be a short-hand for creating arrays as there is for matrices:

  np.mat('.2 .7 .1; .3 .5 .2; .1 .1 .9')

It was suggested in GitHub issue #4817 in light that it would be beneficial to beginners and to presenters during demonstrations.  In GitHub pull request #484, I implemented this as the np.arr function.

Does anyone have any feedback on the API details? Some examples from my implementation follow.

>>> np.arr('3; 4; 5')
    array([[3],
           [4],
           [5]])

>>> np.arr('3; 4; 5', dtype=float)
    array([[ 3.],
           [ 4.],
           [ 5.]])

>>> np.arr('1 0 0; 0 1 0; 0 0 1')
    array([[1, 0, 0],
           [0, 1, 0],
           [0, 0, 1]])

>>> np.arr('4, 5; 6, 7')
    array([[4, 5],
           [6, 7]])
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Charles R Harris | 6 Jul 21:59 2014
Picon

Re: indexed assignment testcases




On Sun, Jul 6, 2014 at 1:32 PM, Benjamin Root <ben.root <at> ou.edu> wrote:
While trying to wrap my head around the issues with matplotlib's tri module and the new numpy indexing, I have made some test cases where I wonder if warnings should be issued.

import numpy as np
a = np.ones((10,))
all_false = np.zeros((10,), dtype=bool)
a[all_false] = np.array([2.0])   # the shapes don't match here

It broadcasts because the leading dimension is 1.
 

mask_in = np.array([False]*8 + [True, True])
a[mask_in] = np.array([])    # raises ValueError as expected
a[mask_in] = np.array([[]])  # no exception because it is 2-D, for some reason (on master, but not release-0.9b1)
 
Now falls back to old behavior and raises a DeprecationWarning. You don't see that by default.
 

a[mask_in] = np.array([2.0]) # This works and repeats 2.0 twice. I thought this wasn't supposed to happen anymore?

Broadcasting again.

Chuck
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Sebastian Berg | 6 Jul 21:58 2014
Picon

Re: indexed assignment testcases

On So, 2014-07-06 at 15:32 -0400, Benjamin Root wrote:
> While trying to wrap my head around the issues with matplotlib's tri
> module and the new numpy indexing, I have made some test cases where I
> wonder if warnings should be issued.
> 
> 
> import numpy as np
> 
> a = np.ones((10,))
> 
> all_false = np.zeros((10,), dtype=bool)
> 
> a[all_false] = np.array([2.0])   # the shapes don't match here
> 

The shapes match using broadcasting. Values shape of (1,) can be
broadcast to indexing result shape of (0,).

> 
> mask_in = np.array([False]*8 + [True, True])
> 
> a[mask_in] = np.array([])    # raises ValueError as expected
> 
> a[mask_in] = np.array([[]])  # no exception because it is 2-D, for
> some reason (on master, but not release-0.9b1)
> 
Gives a (maybe not good) deprecation warning in master. But those are
typically invisible...

> 
> a[mask_in] = np.array([2.0]) # This works and repeats 2.0 twice. I
> thought this wasn't supposed to happen anymore?
> 

Again, broadcasting of values onto out shape.

- Sebastian

> 
> Ben Root
> 
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Benjamin Root | 6 Jul 21:32 2014
Picon

indexed assignment testcases

While trying to wrap my head around the issues with matplotlib's tri module and the new numpy indexing, I have made some test cases where I wonder if warnings should be issued.

import numpy as np
a = np.ones((10,))
all_false = np.zeros((10,), dtype=bool)
a[all_false] = np.array([2.0])   # the shapes don't match here

mask_in = np.array([False]*8 + [True, True])
a[mask_in] = np.array([])    # raises ValueError as expected
a[mask_in] = np.array([[]])  # no exception because it is 2-D, for some reason (on master, but not release-0.9b1)

a[mask_in] = np.array([2.0]) # This works and repeats 2.0 twice. I thought this wasn't supposed to happen anymore?

Ben Root

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Sebastian Berg | 6 Jul 20:54 2014
Picon

Re: Questions about fixes for 1.9.0rc2

On So, 2014-07-06 at 12:07 -0600, Charles R Harris wrote:
> 
> 
> 
> On Sun, Jul 6, 2014 at 11:54 AM, Benjamin Root <ben.root <at> ou.edu>
> wrote:
>         I see that a solution has already been found and merged. Are
>         there any remaining issues for matplotlib to resolve?
>         
>         
>         
> 
> 
> You might take a look at the fixes in the matplotlib PR. They struck
> me as a bit hasty rather than fixes for the underlying problems,
> especially in the cubic interpolation case. The other mismatched
> assignment might be fixable with a `.flat` on the lhs rather than a
> reshape on the rhs. At least that was one suggested fix, I don't know
> if it works...
> 

Frankly, I wouldn't necessarily suggest using .flat assignments instead.
`.flat` will basically enforce the old behavior, which is not
necessarily better...

- Sebastian

> 
> <snip>
> 
> 
> Chuck  
> 
> 
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Benjamin Root | 6 Jul 20:40 2014
Picon

Cython requirement?

When did Cython become a build requirement? I remember discussing the use of Cython a while back, and IIRC the agreement was that both the cython code and the generated C files would be included in version control so that cython wouldn't be a build requirement, only a developer requirement when modifying those files.

I just did a git clean -fxd and rebase to current master, and I am getting a message indicating that I need Cython 0.19 to build numpy (I haven't updated cython in ages on this particular machine).

ben <at> tigger:~/Programs/numpy$ python setup.py install --user
Running from numpy source directory.
Cythonizing sources
Processing numpy/random/mtrand/mtrand.pyx
Traceback (most recent call last):
  File "/home/ben/Programs/numpy/tools/cythonize.py", line 199, in <module>
    main()
  File "/home/ben/Programs/numpy/tools/cythonize.py", line 195, in main
    find_process_files(root_dir)
  File "/home/ben/Programs/numpy/tools/cythonize.py", line 187, in find_process_files
    process(cur_dir, fromfile, tofile, function, hash_db)
  File "/home/ben/Programs/numpy/tools/cythonize.py", line 161, in process
    processor_function(fromfile, tofile)
  File "/home/ben/Programs/numpy/tools/cythonize.py", line 59, in process_pyx
    raise Exception('Building %s requires Cython >= 0.19' % VENDOR)
Exception: Building NumPy requires Cython >= 0.19
Traceback (most recent call last):
  File "setup.py", line 251, in <module>
    setup_package()
  File "setup.py", line 239, in setup_package
    generate_cython()
  File "setup.py", line 191, in generate_cython
    raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!

Ben Root
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Charles R Harris | 5 Jul 04:25 2014
Picon

Remove bento from numpy

Ralf likes the speed of bento, but it is not currently maintained and does not properly build numpy with all the optimizations added by Julian. I find the usual setup.py method fast enough and it has the advantage that all the numpy developers can deal with it.

Thoughts?

Chuck
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Charles R Harris | 4 Jul 21:42 2014
Picon

Questions about fixes for 1.9.0rc2

Sebastian Seberg has fixed one class of test failures due to the indexing changes in numpy 1.9.0b1.  There are some remaining errors, and in the case of the Matplotlib failures, they look to me to be Matplotlib bugs. The 2-d arrays that cause the error are returned by the overloaded _interpolate_single_key function in CubicTriInterpolator that is documented in the base class to return a 1-d array, whereas the actual dimensions are of the form (n, 1). The question is, what is the best work around here for these sorts errors? Can we afford to break Matplotlib and other packages on account of a bug that was previously accepted by Numpy? Perhaps a FutureWarning rather than an error would be more appropriate at this point, and that modification would be easy to make.

Thoughts?

Chuck
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion <at> scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Gmane