<?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://blog.gmane.org/gmane.comp.python.numeric.general">
    <title>gmane.comp.python.numeric.general</title>
    <link>http://blog.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://comments.gmane.org/gmane.comp.python.numeric.general/54264"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54259"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54254"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54253"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54252"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54251"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54242"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54240"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54239"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54237"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54233"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54227"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54222"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54214"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54211"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54207"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54203"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54189"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54185"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.numeric.general/54177"/>
      </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://comments.gmane.org/gmane.comp.python.numeric.general/54264">
    <title>another indexing question</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54264</link>
    <description>&lt;pre&gt;I have a system that transmits signals for an alphabet of M symbols
over and additive Gaussian noise channel.  The receiver has a
1-d array of complex received values.  I'd like to find the means
of the received values according to the symbol that was transmitted.

So transmit symbol indexes might be:

x = [0, 1, 2, 1, 3, ...]

and receive output might be:

y = [(1+1j), (1-1j), ...]

Suppose the alphabet was M=4.  Then I'd like to get an array of means

m[0...3] that correspond to the values of y for each of the corresponding
values of x.

I can't think of a better way than manually using loops.  Any tricks here?
&lt;/pre&gt;</description>
    <dc:creator>Neal Becker</dc:creator>
    <dc:date>2013-05-20T16:00:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54259">
    <title>Equvalent function for Ceil() and Floor()</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54259</link>
    <description>&lt;pre&gt; Hello,

I am using ceil() and floor() function to get upper and lower value of some numbers. Let's say:

import math
x1 = 0.35
y1 = 4.46
1.0
4.0

The problem is that If I want to get upper and lower values for the certain step, for example, step = 0.25, ceil() function should give:
new_ceil(x1, step) =&amp;gt; 0.5
new_floor(y1, step) =&amp;gt; 4.25
Because, the step is 0.25

Question: How I can I achieve those results by using ceil() and floor() function, or Is there any equvalent function for that?
--  Bakhti_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>Bakhtiyor Zokhidov</dc:creator>
    <dc:date>2013-05-20T15:21:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54254">
    <title>faster (selection based) median, 2013 edition</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54254</link>
    <description>&lt;pre&gt;hi,

once again I want to bring up the median algorithm which is implemented
in terms of sorting in numpy.
median (and percentile and a couple more functions) can be more
efficiently implemented in terms of a selection algorithm. The
complexity can them be linear instead of linearithmic.

I found numerous discussions of this in the list archives [1, 2, 3] but
I did not find why those attempts failed, the threads all just seemed to
stop.
Did the previous attempts fail due to lack of time or was there a
fundamental reason blocking this change?

In the hope of the former, I went ahead and implemented a prototype of a
partition function (similar to [3] but only one argument) and
implemented median in terms of it.
partition not like C++ partition, its equivalent to nth_element in C++,
maybe its better to name it nth_element?

The code is available here:
https://github.com/juliantaylor/numpy/tree/select-median

the partition interface is:
ndarray.partition(kth, axis=-1)
kth is an integer
The array is transformed so the k-th element of the array is in its
final sorted order, all below are smaller all above are greater, but the
ordering is undefined

Example:
In [1]: d = np.arange(10); np.random.shuffle(d)
In [2]: d
Out[2]: array([1, 7, 0, 2, 5, 6, 8, 9, 3, 4])
In [3]: np.partition(d, 3)
Out[3]: array([0, 1, 2, 3, 4, 6, 8, 9, 7, 5])
In [4]:  _[3] == 3
Out[5]: True

the performance of median improves as expected:
old vs new, 5000, uniform shuffled, out of place:
100us vs 40us
old vs new, 50000, uniform shuffled, out of place:
1.12ms vs 0.265ms
old vs new, 500000, uniform shuffled, out of place:
14ms vs 2.81ms

The implementation is very much still a prototype, apartition is not
exposed (and only implemented as a quicksort) and there is only one
algorithm (quickselect). One could still add median of medians for
better worst case performance.

If no blockers appear I want to fix this up and file a pull request to
have this in numpy 1.8.
Guidance on details of implementation in numpys C api is highly
appreciated, its the first time I'm dealing with it.

Cheers,
Julian Taylor

[1]
http://thread.gmane.org/gmane.comp.python.numeric.general/50931/focus=50941
[2]
http://thread.gmane.org/gmane.comp.python.numeric.general/32507/focus=41716
[3]
http://thread.gmane.org/gmane.comp.python.numeric.general/32341/focus=32348
&lt;/pre&gt;</description>
    <dc:creator>Julian Taylor</dc:creator>
    <dc:date>2013-05-18T06:12:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54253">
    <title>Newbie trying to install NumPy</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54253</link>
    <description>&lt;pre&gt;Hello,

 

I've been trying to install NumPy to run with Eclipse on Windows Vista.
After installing (I thought) NumPy I was seeing:

 

ImportError: Error importing numpy: you should not try to import numpy from

        its source directory; please exit the numpy source tree, and
relaunch

        your python intepreter from there.

 

I next tried to follow the instructions from the scipy.org website and
downloaded and ran:

 

numpy-1.7.1-win32-superpack-python27.exe

 

This started up but I immediately saw the following dialog:

 

---------------------------

Cannot install

---------------------------

Python version 2.7 required, which was not found in the registry.

---------------------------

OK   

---------------------------

 

The next dialog prompted for a Python installation to use but the list box
was empty and it would not allow me to enter a path.

 

Is it absolutely necessary to build NumPy myself or is there a working
installation out there? I know I'm doing something wrong but I don't know
what it is. Any assistance would be greatly appreciated :).

 

Thanks,

Joseph A. Piccoli

joe13676&amp;lt; at &amp;gt;comcast.net

 

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>Joe Piccoli</dc:creator>
    <dc:date>2013-05-18T05:11:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54252">
    <title>ANN: python-blosc 1.1 RC1 available for testing</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54252</link>
    <description>&lt;pre&gt;================================
Announcing python-blosc 1.1 RC1
================================

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

python-blosc (http://blosc.pydata.org) is a Python wrapper for the
Blosc compression library.

Blosc (http://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.  Whether this is achieved or not
depends of the data compressibility, the number of cores in the system,
and other factors.  See a series of benchmarks conducted for many
different systems: http://blosc.org/trac/wiki/SyntheticBenchmarks.

Blosc works well for compressing numerical arrays that contains data
with relatively low entropy, like sparse data, time series, grids with
regular-spaced values, etc.

There is also a handy command line for Blosc called Bloscpack
(https://github.com/esc/bloscpack) that allows you to compress large
binary datafiles on-disk.  Although the format for Bloscpack has not
stabilized yet, it allows you to effectively use Blosc from your
favorite shell.


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

- Added new `compress_ptr` and `decompress_ptr` functions that allows to
   compress and decompress from/to a data pointer.  These are low level
   calls and user must make sure that the pointer data area is safe.

- Since Blosc (the C library) already supports to be installed as an
   standalone library (via cmake), it is also possible to link
   python-blosc against a system Blosc library.

- The Python calls to Blosc are now thread-safe (another consequence of
   recent Blosc library supporting this at C level).

- Many checks on types and ranges of values have been added.  Most of
   the calls will now complain when passed the wrong values.

- Docstrings are much improved. Also, Sphinx-based docs are available
   now.

Many thanks to Valentin Hänel for his impressive work for this release.

For more info, you can see the release notes in:

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

More docs and examples are available in the documentation site:

http://blosc.pydata.org


Installing
==========

python-blosc is in PyPI repository, so installing it is easy:

$ pip install -U blosc  # yes, you should omit the blosc- prefix


Download sources
================

The sources are managed through github services at:

http://github.com/FrancescAlted/python-blosc


Documentation
=============

There is Sphinx-based documentation site at:

http://blosc.pydata.org/


Mailing list
============

There is an official mailing list for Blosc at:

blosc&amp;lt; at &amp;gt;googlegroups.com
http://groups.google.es/group/blosc


Licenses
========

Both Blosc and its Python wrapper are distributed using the MIT license.
See:

https://github.com/FrancescAlted/python-blosc/blob/master/LICENSES

for more details.

--
Francesc Alted
&lt;/pre&gt;</description>
    <dc:creator>Francesc Alted</dc:creator>
    <dc:date>2013-05-17T18:36:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54251">
    <title>[ANN] Multidimensional Array - MDArray (0.5.0)</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54251</link>
    <description>&lt;pre&gt;Although this is not directly connected to NumPy, I believe that it could
be of interest to the NymPy community.  If, by any reason it is inproper to
post this type of announcement on this list, please let me know.

I´m happy to announce a new version of MDArray...


MDArray
=======

MDArray is a multi dimensional array implemented for JRuby inspired by
NumPy (www.numpy.org)
and Narray (narray.rubyforge.org) by Masahiro Tanaka.  MDArray stands on
the shoulders of
Java-NetCDF and Parallel Colt.

NetCDF-Java Library is a Java interface to NetCDF files, as well as to many
other types of
scientific data formats.  It is developed and distributed by Unidata (
http://www.unidata.ucar.edu).

Parallel Colt (sites.google.com/site/piotrwendykier/software/parallelcolt)
is a multithreaded
version of Colt (http://acs.lbl.gov/software/colt/).  Colt provides a set
of Open Source
Libraries for High Performance Scientific and Technical Computing in Java.
Scientific
and technical computing is characterized by demanding problem sizes and a
need for high
performance at reasonably small memory footprint.

MDArray and SciRuby
===================

MDArray subscribes fully to the SciRuby Manifesto (http://sciruby.com/).

"Ruby has for some time had no equivalent to the beautifully constructed
NumPy, SciPy,
and matplotlib libraries for Python.

We believe that the time for a Ruby science and visualization package has
come. Sometimes
when a solution of sugar and water becomes super-saturated, from it
precipitates a pure,
delicious, and diabetes-inducing crystal of sweetness, induced by no more
than the tap
of a finger. So is occurring now, we believe, with numeric and
visualization libraries for Ruby."

Main properties
===============

  + Homogeneous multidimensional array, a table of elements (usually
numbers), all of the
      same type, indexed by a tuple of positive integers;
  + Easy calculation for large numerical multi dimensional arrays;
  + Basic types are: boolean, byte, short, int, long, float, double,
string, structure;
  + Based on JRuby, which allows importing Java libraries;
  + Operator: +,-,*,/,%,**, &amp;gt;, &amp;gt;=, etc.
  + Functions: abs, ceil, floor, truncate, is_zero, square, cube, fourth;
  + Binary Operators: &amp;amp;, |, ^, ~ (binary_ones_complement), &amp;lt;&amp;lt;, &amp;gt;&amp;gt;;
  + Ruby Math functions: acos, acosh, asin, asinh, atan, atan2, atanh,
cbrt, cos, erf, exp,
      gamma, hypot, ldexp, log, log10, log2, sin, sinh, sqrt, tan, tanh,
neg;
  + Boolean operations on boolean arrays: and, or, not;
  + Fast descriptive statistics from Parallel Colt (complete list found
bellow);
  + Easy manipulation of arrays: reshape, reduce dimension, permute,
section, slice, etc.
  + Reading of two dimensional arrays from CSV files (mainly for debugging
and simple
      testing purposes);
  + StatList: a list that can grow/shrink and that can compute Parallel
Colt descriptive
      statistics.

Descriptive statistics methods
==============================

auto_correlation, correlation, covariance, durbin_watson, frequencies,
geometric_mean,
harmonic_mean, kurtosis, lag1, max, mean, mean_deviation, median, min,
moment, moment3,
moment4, pooled_mean, pooled_variance, product, quantile, quantile_inverse,
rank_interpolated, rms, sample_covariance, sample_kurtosis,
sample_kurtosis_standard_error, sample_skew, sample_skew_standard_error,
sample_standard_deviation, sample_variance, sample_weighted_variance, skew,
split,
standard_deviation, standard_error, sum, sum_of_inversions,
sum_of_logarithms,
sum_of_powers, sum_of_power_deviations, sum_of_squares,
sum_of_squared_deviations,
trimmed_mean, variance, weighted_mean, weighted_rms, weighted_sums,
winsorized_mean.

Installation and download
=========================

  + Install Jruby
  + jruby -S gem install mdarray

Contributors
============

  + Contributors are welcome.

Homepages
=========

  + http://rubygems.org/gems/mdarray
  + https://github.com/rbotafogo/mdarray/wiki


HISTORY
=======

  + 16/05/2013: Version 0.5.0: All loops transfered to Java with over 50%
performance
      improvement.  Descriptive statistics from Parallel Colt.
  + 19/04/2013: Version 0.4.3: Fixes a simple (but fatal bug).  No new
features
  + 17/04/2013: Version 0.4.2: Adds simple statistics and boolean operators
  + 05/05/2013: Version 0.4.0: Initial release

&lt;/pre&gt;</description>
    <dc:creator>Rodrigo Botafogo</dc:creator>
    <dc:date>2013-05-17T13:20:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54242">
    <title>numpy.nanmin, numpy.nanmax,and scipy.stats.nanmean</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54242</link>
    <description>&lt;pre&gt;It seems odd that `nanmin` and `nanmax` are in NumPy, while `nanmean` is in
SciPy.stats.  I'd like to propose that a `nanmean` function be added to
NumPy.

Phillip
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>Phillip Feldman</dc:creator>
    <dc:date>2013-05-16T22:09:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54240">
    <title>RuntimeWarning: divide by zero encountered in log</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54240</link>
    <description>&lt;pre&gt;Is there a way to get a traceback instead of just printing the
line that triggered the error?
&lt;/pre&gt;</description>
    <dc:creator>Neal Becker</dc:creator>
    <dc:date>2013-05-16T18:42:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54239">
    <title>experiments with SSE vectorization</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54239</link>
    <description>&lt;pre&gt;Hi,
I have been experimenting a bit with how applicable SSE vectorization is
to NumPy.
In principle the core of NumPy mostly deals with memory bound
operations, but it turns out on modern machines with large caches you
can still get decent speed ups.

The experiments are available on this fork:
https://github.com/juliantaylor/numpy/tree/simd-experiments
It includes a simple benchmark 'npbench.py' in the top level.
No runtime detection is used, it is only enabled on amd64 systems(which
always has SSE2).

The simd-experiments branch vectorizes the sqrt, basic math operations
and min/max reductions.
For float32 operations you get speedups around 2 (simple ops) - 4 (sqrt).
For double it is around 1.2 - 2, depending on the cpu.
My Phenom(tm) II X4 955 retains a good speedup even for very large
datasizes but on intel cpus (xeon and core2duo) you don't gain anything
if the data is larger than the L3 cache.
The vectorized version was never slower on phenom and xeon.
But on a core2duo the normal addition with very large datasets got 10%
slower. This can be compensated by using aligned load operations, but
its not implemented yet.
I'm interested in your results of npbench.py command on other cpus, so
if you want to try it please send me the output (include /proc/cpuinfo)

The code is a little rough, it can probably be cleaned up a bit by
adapting the code generator used.
Would this be something worth including in NumPy?

Further vectorization targets on my todo list are things like
std/var/mean, basically anything that has a high computation/memory
ration, suggestions are welcome.


Here the detailed results for my phenom:
float32 datasize (2MB)
operation:                         speedup
np.float32 np.max(d)                 3.04
np.float32 np.min(d)                  3.1
np.float32 np.sum(d)                 3.02
np.float32 np.prod(d)                3.04
np.float32 np.add(1, d)              1.44
np.float32 np.add(d, 1)              1.45
np.float32 np.divide(1, d)           3.41
np.float32 np.divide(d, 1)           3.41
np.float32 np.divide(d, d)           3.42
np.float32 np.add(d, d)              1.42
np.float32 np.multiply(d, d)         1.43
np.float32 np.sqrt(d)                4.26

float64 datasize (4MB)
operation:                         speedup
np.float64 np.max(d)                    2
np.float64 np.min(d)                 1.89
np.float64 np.sum(d)                 1.62
np.float64 np.prod(d)                1.63
np.float64 np.add(1, d)              1.08
np.float64 np.add(d, 1)             0.993
np.float64 np.divide(1, d)           1.83
np.float64 np.divide(d, 1)           1.74
np.float64 np.divide(d, d)            1.8
np.float64 np.add(d, d)              1.02
np.float64 np.multiply(d, d)         1.05
np.float64 np.sqrt(d)                2.22

attached the results for intel cpus.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>Julian Taylor</dc:creator>
    <dc:date>2013-05-16T17:42:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54237">
    <title>__array_priority__ ignored if __array__ ispresent</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54237</link>
    <description>&lt;pre&gt;Hi everyone,

(this was posted as part of another topic, but since it was unrelated,
I'm reposting as a separate thread)

I've also been having issues with __array_priority__ - the following
code behaves differently for __mul__ and __rmul__:

"""
import numpy as np


class TestClass(object):

    def __init__(self, input_array):
        self.array = input_array

    def __mul__(self, other):
        print "Called __mul__"

    def __rmul__(self, other):
        print "Called __rmul__"

    def __array_wrap__(self, out_arr, context=None):
        print "Called __array_wrap__"
        return TestClass(out_arr)

    def __array__(self):
        print "Called __array__"
        return np.array(self.array)
"""

with output:

"""
In [7]: a = TestClass([1,2,3])

In [8]: print type(np.array([1,2,3]) * a)
Called __array__
Called __array_wrap__
&amp;lt;class '__main__.TestClass'&amp;gt;

In [9]: print type(a * np.array([1,2,3]))
Called __mul__
&amp;lt;type 'NoneType'&amp;gt;
"""

Is this also an oversight? I opened a ticket for it a little while ago:

https://github.com/numpy/numpy/issues/3164

Any ideas?

Thanks!
Tom
&lt;/pre&gt;</description>
    <dc:creator>Thomas Robitaille</dc:creator>
    <dc:date>2013-05-16T13:19:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54233">
    <title>Strange memory consumption in numpy?</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54233</link>
    <description>&lt;pre&gt;Hi all,

In the context of memory profiling an application (with memory_profiler
module) we came up a strange behaviour in numpy, see for yourselves:

Line #    Mem usage    Increment   Line Contents
================================================
    29                             &amp;lt; at &amp;gt;profile
    30    23.832 MB     0.000 MB   def main():
    31    46.730 MB    22.898 MB       arr1 = np.random.rand(1000000, 3)
    32    58.180 MB    11.449 MB       arr1s = arr1.astype(np.float32)
    33    35.289 MB   -22.891 MB       del arr1
    34    35.289 MB     0.000 MB       gc.collect()
    35    58.059 MB    22.770 MB       arr2 = np.random.rand(1000000, 3)
    36    69.500 MB    11.441 MB       arr2s = arr2.astype(np.float32)
    37    69.500 MB     0.000 MB       del arr2
    38    69.500 MB     0.000 MB       gc.collect()
    39    69.500 MB     0.000 MB       arr3 = np.random.rand(1000000, 3)
    40    80.945 MB    11.445 MB       arr3s = arr3.astype(np.float32)
    41    80.945 MB     0.000 MB       del arr3
    42    80.945 MB     0.000 MB       gc.collect()
    43    80.945 MB     0.000 MB       return arr1s, arr2s, arr3s


The lines 31-34 are behaving as expected, but then we don't understand
35-38 (why is arr2 not garbage collected ?) and 39-42 (why doesn't the
random allocate any memory ?).

Can anyone give a reasonable explanation ?

I attach the full script for reference.

Best regards,
Martin
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>Martin Raspaud</dc:creator>
    <dc:date>2013-05-16T07:35:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54227">
    <title>Integer overflow in test_einsum (1.7.1)</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54227</link>
    <description>&lt;pre&gt;Hello,

One of the test cases in test_einsum causes integer overflow for i2 type. The test goes like this:


It then calculates AxB using einsum. The problem is that the values in the last row of the result do not fit into i2:

array([[  6090.,   6195.,   6300.,   6405.,   6510.,   6615.],
       [ 15540.,  15870.,  16200.,  16530.,  16860.,  17190.],
       [ 24990.,  25545.,  26100.,  26655.,  27210.,  27765.],
       [ 34440.,  35220.,  36000.,  36780.,  37560.,  38340.]])

In my build this produces different results depending on whether out or .astype is used:

array([[  6090,   6195,   6300,   6405,   6510,   6615],
       [ 15540,  15870,  16200,  16530,  16860,  17190],
       [ 24990,  25545,  26100,  26655,  27210,  27765],
       [-31096, -30316, -29536, -28756, -27976, -27196]], dtype=int16)

array([[  6090,   6195,   6300,   6405,   6510,   6615],
       [ 15540,  15870,  16200,  16530,  16860,  17190],
       [ 24990,  25545,  26100,  26655,  27210,  27765],
       [-32768, -32768, -32768, -32768, -32768, -32768]], dtype=int16)

The test wants these (actually the same using numpy.dot) to be equal, so this difference causes it to fail. Both ways to handle overflow seem reasonable to me.

Does numpy in general assign a defined behavior to integer overflow (e.g. two's complement)?
Is this use of integer overflow in the test intentional and is expected to work, or is my build broken?

Best regards,
Eugene


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  _______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>Toder, Evgeny</dc:creator>
    <dc:date>2013-05-14T17:26:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54222">
    <title>slight MapIter change</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54222</link>
    <description>&lt;pre&gt;Hey,

(this is only interesting if you know what MapIter and actually use it)

In case anyone already uses the newly exposed mapiter (it was never
released yet). There is a tiny change, which only affects indexes that
start with np.newaxis but otherwise just simplifies a tiny bit. The old
block for swapping axes should be changed like this:

     if ((mit-&amp;gt;subspace != NULL) &amp;amp;&amp;amp; (mit-&amp;gt;consec)) {
-        if (mit-&amp;gt;iteraxes[0] &amp;gt; 0) {
-            PyArray_MapIterSwapAxes(mit, (PyArrayObject **)&amp;amp;arr, 0);
-            if (arr == NULL) {
-                return -1;
-            }
+        PyArray_MapIterSwapAxes(mit, (PyArrayObject **)&amp;amp;arr, 0);
+        if (arr == NULL) {
+            return -1;
         }
     }

Regards,

Sebastian
&lt;/pre&gt;</description>
    <dc:creator>Sebastian Berg</dc:creator>
    <dc:date>2013-05-11T15:41:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54214">
    <title>somewhat less stupid problem with 0-d arrays</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54214</link>
    <description>&lt;pre&gt;It would be convenient if in arithmetic 0-d arrays were just ignored - it would
seem to me to be convenient in generic code where a degenerate array is treated
as "nothing"

np.zeros ((0,0)) + np.ones ((2,2))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&amp;lt;ipython-input-17-27af0e0bbc6f&amp;gt; in &amp;lt;module&amp;gt;()
----&amp;gt; 1 np.zeros ((0,0)) + np.ones ((2,2))

ValueError: operands could not be broadcast together with shapes (0,0) (2,2)
&lt;/pre&gt;</description>
    <dc:creator>Neal Becker</dc:creator>
    <dc:date>2013-05-10T23:57:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54211">
    <title>0-dim arrays inconsistency</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54211</link>
    <description>&lt;pre&gt;np.array ((0,0))
Out[10]: array([0, 0])  &amp;lt;&amp;lt;&amp;lt; ok, it's 2 dimensional

In [11]: np.array ((0,0)).shape
Out[11]: (2,)  &amp;lt;&amp;lt;&amp;lt; except, it isn't
&lt;/pre&gt;</description>
    <dc:creator>Neal Becker</dc:creator>
    <dc:date>2013-05-10T23:36:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54207">
    <title>tests not running</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54207</link>
    <description>&lt;pre&gt;Here is my set up:

Mac OS 10.7.5
Xcode 4.5.1
Intel Fortran 12.1
Python 2.7.3 built from source
Numpy 1.6.2 built from source, using MKL 11.0
nose 0.11.4 installed

I run the numpy tests as documented (python -c 'import numpy; numpy.test()'), but get this output:

tkacvins&amp;lt; at &amp;gt;macomsim&amp;gt; python -c 'import numpy; numpy.test()'
Running unit tests for numpy
NumPy version 1.6.2
NumPy is installed in /rd/gen/tky/do_not_delete/Python/macpython27/lib/python2.7/site-packages/numpy
Python version 2.7.3 (default, Oct 10 2012, 14:47:52) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)]
nose version 0.11.4

----------------------------------------------------------------------
Ran 0 tests in 0.025s

OK

Any diagnostics or options I can pass to the tests to see what is going on?   This is rather odd, I thought the tests would run and possibly fail.  I didn't expect 0 tests to run.

Thanks,

Tom

This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email and all attachments,

(iii) Dassault Systemes does not accept or assume any liability or responsibility for any use of or reliance on this email.

For other languages, go to http://www.3ds.com/terms/email-disclaimer
&lt;/pre&gt;</description>
    <dc:creator>KACVINSKY Tom</dc:creator>
    <dc:date>2013-05-10T19:41:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54203">
    <title>__array_priority__ don't work for gt, lt,... operator</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54203</link>
    <description>&lt;pre&gt;Hi,

it popped again on the Theano mailing list that this don't work:

np.arange(10) &amp;lt;= a_theano_vector.

The reason is that __array_priority__ isn't respected for that class of
operation.

This page explain the problem and give a work around:

http://stackoverflow.com/questions/14619449/how-can-i-override-comparisons-between-numpys-ndarray-and-my-type

The work around is to make a python function that will decide witch version
of the comparator to call and do the call. Then we tell NumPy to use that
function instead of its current function with: np.set_numeric_ops(...)

But if we do that, when we import theano, we will slow down all normal
numpy comparison for the user, as when &amp;lt;= is execute, first there will be
numpy c code executed, that will call the python function to decide witch
version to do, then if it is 2 numpy ndarray, it will call again numpy c
code.

That isn't a good solution. We could do the same override in C, but then
theano work the same when there isn't a c++ compiler. That isn't nice.

What do you think of changing them to check for __array_priority__ before
doing the comparison?

Frédéric
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>Frédéric Bastien</dc:creator>
    <dc:date>2013-05-10T16:08:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54189">
    <title>Scalar output from sub-classed Numpy array</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54189</link>
    <description>&lt;pre&gt;Hi everyone,

I am currently trying to write a sub-class of Numpy ndarray, but am
running into issues for functions that return scalar results rather
than array results. For example, in the following case:

    import numpy as np

    class TestClass(np.ndarray):

        def __new__(cls, input_array, unit=None):
            return np.asarray(input_array).view(cls)

        def __array_finalize__(self, obj):
            if obj is None:
                return

        def __array_wrap__(self, out_arr, context=None):
            return np.ndarray.__array_wrap__(self, out_arr, context)

I get:

    In [4]: a = TestClass([1,2,3])

    In [5]: print type(np.dot(a,a))
    &amp;lt;type 'numpy.int64'&amp;gt;

    In [6]: a = TestClass([[1,2],[1,2]])

    In [7]: print type(np.dot(a,a))
    &amp;lt;class '__main__.TestClass'&amp;gt;

that is, in the case where the output is a scalar, it doesn't get
wrapped, while in the case where the output is an array, it does.
Could anyone explain this behavior to me, and most importantly, is
there a way around this and have the above example return a wrapped
0-d TestClass array instead of a Numpy int64?

Thanks,
Tom
&lt;/pre&gt;</description>
    <dc:creator>Thomas Robitaille</dc:creator>
    <dc:date>2013-05-10T10:34:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54185">
    <title>Name change of the ptp() function</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54185</link>
    <description>&lt;pre&gt;The peak-to-peak function, ptp(), is a simple and handy function to
use, but it confuses the PEP20 suggestions a bit. See this discussion
for reference: http://d.pr/i/snXG

Based on the discussion, it may be a good idea to make the name more
relevant? Some suggestions include span() or valuerange(). Among few
others who have discussed this on Github
(https://github.com/numpy/numpy/issues/3292#issuecomment-17353454)
valuerange() appears to the best most favored one.

-Eli
&lt;/pre&gt;</description>
    <dc:creator>Eli Bressert</dc:creator>
    <dc:date>2013-05-10T05:47:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54177">
    <title>www.scipy.org down?</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54177</link>
    <description>&lt;pre&gt;I am looking for a release of numpy for Mac OS, but I can't reach the scipy web server.  IS it down for maintenance?

Thanks,

Tom

This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email and all attachments,

(iii) Dassault Systemes does not accept or assume any liability or responsibility for any use of or reliance on this email.

For other languages, go to http://www.3ds.com/terms/email-disclaimer
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion&amp;lt; at &amp;gt;scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
&lt;/pre&gt;</description>
    <dc:creator>KACVINSKY Tom</dc:creator>
    <dc:date>2013-05-09T13:10:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.numeric.general/54171">
    <title>Integer type casting and OverflowError</title>
    <link>http://comments.gmane.org/gmane.comp.python.numeric.general/54171</link>
    <description>&lt;pre&gt;With master numpy (and back to 1.6.1, at least):

[~]
|1&amp;gt; np.int32(3054212286)
-1240755010


It seems like at one time, this used to raise an OverflowError. We can
see this in at least one place in scipy:

https://github.com/scipy/scipy/blob/master/scipy/interpolate/fitpack.py#L912

Is this a regression in numpy, or should the code in scipy be fixed to
use a different test? Even if it is technically a regression, it might
be one of those "it's been broken so long, it's a feature now"
regressions.

--
Robert Kern
&lt;/pre&gt;</description>
    <dc:creator>Robert Kern</dc:creator>
    <dc:date>2013-05-09T10:21:30</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>
