<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general">
    <title>gmane.comp.python.numeric.general</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50085"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50084"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50083"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50082"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50081"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50080"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50079"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50078"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50077"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50076"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50075"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50074"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50073"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50072"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50071"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50070"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50069"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50068"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50067"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.numeric.general/50066"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50085">
    <title>Re: how to avoid re-shaping</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50085</link>
    <description>&lt;pre&gt;
On May 22, 2012, at 10:12 AM, Robert Kern wrote:


That's what I was looking for. Thank you.


&lt;/pre&gt;</description>
    <dc:creator>Massimo DiPierro</dc:creator>
    <dc:date>2012-05-22T15:21:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50084">
    <title>Re: how to avoid re-shaping</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50084</link>
    <description>&lt;pre&gt;On Tue, May 22, 2012 at 4:09 PM, Massimo DiPierro
&amp;lt;massimo.dipierro&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

Note that the .reshape() method does not work in-place. It just
returns a new ndarray object viewing the same data using the different
shape.

That said, just iterate over data.flat, if you must iterate manually.

&lt;/pre&gt;</description>
    <dc:creator>Robert Kern</dc:creator>
    <dc:date>2012-05-22T15:12:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50083">
    <title>how to avoid re-shaping</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50083</link>
    <description>&lt;pre&gt;One more questions (since this list is very useful. ;-)

If I have a numpy array of arbitrary shape, is there are a way to sequentially loop over its elements without reshaping it into a 1D array?

I am trying to simplify this:

n=product(data.shape)
oldshape = data.shape
newshape = (n,)
data.reshape(newshape)
for i in xrange(n):
     do_something_with(data[i])
data.reshape(oldshape)

Massimo
&lt;/pre&gt;</description>
    <dc:creator>Massimo DiPierro</dc:creator>
    <dc:date>2012-05-22T15:09:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50082">
    <title>Re: question about in-place operations</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50082</link>
    <description>&lt;pre&gt;Thank you this does it.



On May 22, 2012, at 9:59 AM, Robert Kern wrote:

&lt;/pre&gt;</description>
    <dc:creator>Massimo DiPierro</dc:creator>
    <dc:date>2012-05-22T15:06:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50081">
    <title>Re: question about in-place operations</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50081</link>
    <description>&lt;pre&gt;On Tue, May 22, 2012 at 3:47 PM, Massimo DiPierro
&amp;lt;massimo.dipierro&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

BLAS has the xAXPY functions, which will do this for float and complex.

import numpy as np
from scipy.linalg import fblas

def add_scaled_inplace(a, scale, b):
    if np.issubdtype(a.dtype, complex):
        fblas.zaxpy(b, a, a=scale)
    else:
        fblas.daxpy(b, a, a=scale)

&lt;/pre&gt;</description>
    <dc:creator>Robert Kern</dc:creator>
    <dc:date>2012-05-22T14:59:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50080">
    <title>Re: question about in-place operations</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50080</link>
    <description>&lt;pre&gt;For now I will be doing this:

import numpy
import time

a=numpy.zeros(2000000)
b=numpy.zeros(2000000)
c=1.0

# naive solution
t0 = time.time()
for i in xrange(len(a)):
    a[i] += c*b[i]
print time.time()-t0

# possible solution
n=100000
t0 = time.time()
for i in xrange(0,len(a),n):
    a[i:i+n] += c*b[i:i+n]
print time.time()-t0

the second "possible" solution appears 1000x faster then the former in my tests and uses little extra memory. It is only 2x slower than b*=c.

Any reason not to do it?

On May 22, 2012, at 9:32 AM, Dag Sverre Seljebotn wrote:

&lt;/pre&gt;</description>
    <dc:creator>Massimo DiPierro</dc:creator>
    <dc:date>2012-05-22T14:54:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50079">
    <title>Re: Internationalization of numpy/scipydocstrings...</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50079</link>
    <description>&lt;pre&gt;
I understand that this is non-trivial, for me anyway, because I can't
figure out how to make my way around numpydoc, and documentation editor
code (not quite true, as Pauli accepted a couple of my pull requests, but
I definitely can't make it dance).  This is why I asked for interest and
help on the mailing list.  I think for the people that worked on the
documentation editor, or know Django, or are cleverer than I, the required
changes to the documentation editor might by mid-trivial.  That is my hope
anyway.

Would probably have the high-level docs separate from the docstring
processing anyway since the high-level docs are already in a sphinx source
directory.  So I agree that the high-level docs would be the best place to
start and in-fact that is what I was working with and found the problem
with the sphinx gettext builder mentioned in the original post.

I do want to defend and clarify the docstring processing though.
 Docstrings, in the code, will always be English. The documentation editor
is the ful&lt;/pre&gt;</description>
    <dc:creator>Tim Cera</dc:creator>
    <dc:date>2012-05-22T14:51:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50078">
    <title>Re: question about in-place operations</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50078</link>
    <description>&lt;pre&gt;Thank you. I will look into numexpr. 

Anyway, I do not need arbitrary expressions. If there were something like

numpy.add_scaled(a,scale,b)

with support for scale in int, float, complex, this would be sufficient for me.

Massimo

On May 22, 2012, at 9:32 AM, Dag Sverre Seljebotn wrote:

&lt;/pre&gt;</description>
    <dc:creator>Massimo DiPierro</dc:creator>
    <dc:date>2012-05-22T14:47:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50077">
    <title>Re: un-silencing Numpy's deprecation warnings</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50077</link>
    <description>&lt;pre&gt;
For SpacePy we took a similar but slightly different approach; this is 
in the top-level __init__:
if config['enable_deprecation_warning']:
     warnings.filterwarnings('default', '', DeprecationWarning,
                             '^spacepy', 0, False)
enable_deprecation_warning is True by default, but can be changed in the 
user's config file. This keeps everything as DeprecationWarning but only 
fiddles with the filter for spacepy (and it's set to default, not always.)

&lt;/pre&gt;</description>
    <dc:creator>Jonathan T. Niehof</dc:creator>
    <dc:date>2012-05-22T14:39:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50076">
    <title>Re: question about in-place operations</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50076</link>
    <description>&lt;pre&gt;
I don't think NumPy support this; if you can't modify b[i] in-place, I 
think your only option will be one of numexpr/Theano/Cython.

Dag
&lt;/pre&gt;</description>
    <dc:creator>Dag Sverre Seljebotn</dc:creator>
    <dc:date>2012-05-22T14:32:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50075">
    <title>question about in-place operations</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50075</link>
    <description>&lt;pre&gt;hello everybody,

first of all thanks to the developed for bumpy which is very useful. I am building a software that uses numpy+pyopencl for lattice qcd computations. One problem that I am facing is that I need to perform most operations on arrays in place and I must avoid creating temporary arrays (because my arrays are many gigabyte large).

One typical operation is this

a[i] += const * b[i]

What is the efficient way to do is when a and b are arbitrary arrays?  const is usually a complex number.
a and b have the same shape but are not necessarily uni-dimensional.

Massimo
&lt;/pre&gt;</description>
    <dc:creator>Massimo DiPierro</dc:creator>
    <dc:date>2012-05-22T14:25:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50074">
    <title>Building error with ATLAS</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50074</link>
    <description>&lt;pre&gt;Hi all,


I'm now trying to build NumPy with ATLAS on CentOS 6.2.
I'm going to use them with SciPy.

My CentOS is installed as "Software Development Workstation"
on my Virtual Machine (VMware Fusion 4, Mac OS 10.7.4).
I already installed Python 2.7.3 on /usr/local/python-2.7.3 from sources,
and no other tools are installed yet.

I tried but failed to build ATLAS, so I got ATLAS by using yum command:


Then I tried to build NumPy.
But I got these errors:

Before I built NumPy, I uncommented and modified site.cfg as below:

And "setup.py config" dumped these messages:

When I built NumPy before "yum install", it was successfully finished.
I didn't use site.cfg, but I had to export CFLAGS="-L/usr/local/python-2.7.3/lib".

How can I build and install NumPy with yum-installed ATLAS?


Magician
&lt;/pre&gt;</description>
    <dc:creator>Magician</dc:creator>
    <dc:date>2012-05-22T13:52:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50073">
    <title>Re: un-silencing Numpy's deprecation warnings</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50073</link>
    <description>&lt;pre&gt;
Sure.

&lt;/pre&gt;</description>
    <dc:creator>Robert Kern</dc:creator>
    <dc:date>2012-05-22T13:49:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50072">
    <title>Re: un-silencing Numpy's deprecation warnings</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50072</link>
    <description>&lt;pre&gt;
Yes, good points -- though I think there is a also real cost/benefit
trade-off that depends on the details of how often these warnings are
issued, the specific user base, etc.

Compared to stdlib, a *much* higher proportion of numpy-using code
consists of scripts whose only users are their authors, who didn't
think very carefully about error handling, and who will continue to
use these scripts for long periods of time (i.e. over multiple
releases). So I feel like we should have a higher threshold for making
warnings silent by default.

OTOH, the distinction you suggest does make sense. I would summarize it as:

 - If a function or similar will just disappear in a future release,
causing obvious failures in any code that depends on it, then
DeprecationWarning is fine. People's code will unexpectedly break from
time to time, but in safe ways, and anyway downgrading is easy.
- Otherwise FutureWarning is preferred

Does that sound like a reasonable rule of thumb?

&lt;/pre&gt;</description>
    <dc:creator>Nathaniel Smith</dc:creator>
    <dc:date>2012-05-22T13:45:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50071">
    <title>Problem with str.format() and np.recarray</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50071</link>
    <description>&lt;pre&gt;I came across this problem which appears to be new in numpy 1.6.2 (vs. 1.6.1):

In [17]: a = np.array([(1, )], dtype=[('a', 'i4')])

In [18]: ra = a.view(np.recarray)

In [19]: '{}'.format(ra[0])
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/data/baffin/tom/git/eng_archive/&amp;lt;ipython-input-19-cbdd26e3ea78&amp;gt; in &amp;lt;module&amp;gt;()
----&amp;gt; 1 '{}'.format(ra[0])

RuntimeError: maximum recursion depth exceeded while calling a Python object

In [20]: str(ra[0])
Out[20]: '(1,)'

In [21]: ra[0]
Out[21]: (1,)

There are obvious workarounds but it seems something is not right.
I'm running Python 2.7 on linux x86_64.

Cheers,
Tom
&lt;/pre&gt;</description>
    <dc:creator>Tom Aldcroft</dc:creator>
    <dc:date>2012-05-22T13:39:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50070">
    <title>assign a float number to a member of integerarray always return integer</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50070</link>
    <description>&lt;pre&gt;Dear all,

Just in case some one didn't know this. Assign a float number to an integer
array element will always return integer.

In [4]: a=np.arange(2,11,2)

In [5]: a
Out[5]: array([ 2,  4,  6,  8, 10])

In [6]: a[1]=4.5

In [7]: a
Out[7]: array([ 2,  4,  6,  8, 10])

so I would always do this if I expected a transfer from integer to float?
In [18]: b=a.astype(float)

In [19]: b
Out[19]: array([  2.,   4.,   6.,   8.,  10.])

In [20]: b[1]=4.5

In [21]: b
Out[21]: array([  2. ,   4.5,   6. ,   8. ,  10. ])

thanks et cheers,

Chao
&lt;/pre&gt;</description>
    <dc:creator>Chao YUE</dc:creator>
    <dc:date>2012-05-22T13:33:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50069">
    <title>Re: un-silencing Numpy's deprecation warnings</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50069</link>
    <description>&lt;pre&gt;On Tue, May 22, 2012 at 11:14 AM, Dag Sverre Seljebotn
&amp;lt;d.s.seljebotn&amp;lt; at &amp;gt;astro.uio.no&amp;gt; wrote:


Sure.

&lt;/pre&gt;</description>
    <dc:creator>Robert Kern</dc:creator>
    <dc:date>2012-05-22T10:39:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50068">
    <title>Re: un-silencing Numpy's deprecation warnings</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50068</link>
    <description>&lt;pre&gt;
I guess the diagonal() change would at least be a FutureWarning then? 
(When you write to the result?)

Dag

&lt;/pre&gt;</description>
    <dc:creator>Dag Sverre Seljebotn</dc:creator>
    <dc:date>2012-05-22T10:14:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50067">
    <title>Re: un-silencing Numpy's deprecation warnings</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50067</link>
    <description>&lt;pre&gt;
That's not quite it, I think, since this change was also made in
Python 3.2 and will remain for all future versions of Python.
DeprecationWarning *is* used for things that will definitely be going
away, not just things that are no longer recommended but will continue
to live. Note that the 3.2 moratorium was for changes to the language
proper. The point was to encourage stdlib development, including the
removal of deprecated code. It was not a moratorium on removing
deprecated things. The silencing discussion just came up first in a
discussion on the moratorium.

The main problem they were running into was that the people who saw
these warnings the most were not people directly using the deprecated
features; they were users of packages written by third parties that
used the deprecated features. Those people can't do anything to fix
the problem, and many of them think that something is broken when they
see the warning (I don't know why people do this, but they do). This
problem is exacerbated by the standard&lt;/pre&gt;</description>
    <dc:creator>Robert Kern</dc:creator>
    <dc:date>2012-05-22T10:06:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50066">
    <title>Re: un-silencing Numpy's deprecation warnings</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50066</link>
    <description>&lt;pre&gt;
We had the same discussion for Biopython two years ago, and
introduced our own warning class to avoid our deprecations being
silent (and thus almost pointless). It is just a subclass of Warning
(originally we used a subclass of UserWarning).
&lt;/pre&gt;</description>
    <dc:creator>Peter</dc:creator>
    <dc:date>2012-05-22T09:50:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.numeric.general/50065">
    <title>Re: Separating out the maskna code</title>
    <link>http://permalink.gmane.org/gmane.comp.python.numeric.general/50065</link>
    <description>&lt;pre&gt;
We can talk about this one and everyone's welcome to look at the
patch, of course. (In fact it'd be useful if anyone catches any issues
now, so I can roll them into the final rebase.) But I'll rebase it
again after the PyArray_diagonal thing has been sorted to sort out
conflicts, and also fix some docs that I missed, so I don't want to
create an actual PR yet.

&lt;/pre&gt;</description>
    <dc:creator>Nathaniel Smith</dc:creator>
    <dc:date>2012-05-22T08:30:22</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.numeric.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.numeric.general</link>
  </textinput>
</rdf:RDF>

