Re: [Numpy-discussion] mail.scipy.org update

2016-09-26 Thread Didrik Pinte
If all the SSL certification updates have been done properly, this message
should go through.

-- Didrik

On 14 September 2016 at 13:00, Didrik Pinte  wrote:

> Hi everyone,
>
> While updating the scipy SSL certificates yesterday, it appeared that
> filesystem of the servers is corrupted (more than likely a hardware
> failure). The problem is restricted to one volume and impacts only the web
> services. The mailing list/mailman service works as expected.
>
> We're working on restoring all the different non-functional services.
>
> Thanks for you patience!
>
> -- Didrik
>



-- 
Didrik Pinte +32 475 665 668
   +44 1223 969515
Enthought Inc.dpi...@enthought.com
Scientific Computing Solutions   http://www.enthought.com

The information contained in this message is Enthought confidential & not
to be dissiminated to outside parties without explicit prior approval from
sender.  This message is intended solely for the addressee(s), If you are
not the intended recipient, please contact the sender by return e-mail and
destroy all copies of the original message.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] guvectorize, a helper for writing generalized ufuncs

2016-09-26 Thread Stephan Hoyer
I have put a pull request implementing numpy.guvectorize up for review:
https://github.com/numpy/numpy/pull/8054

Cheers,
Stephan

On Tue, Sep 13, 2016 at 10:54 PM, Travis Oliphant 
wrote:

> There has been some discussion on the Numba mailing list as well about a
> version of guvectorize that doesn't compile for testing and flexibility.
>
> Having this be inside NumPy itself seems ideal.
>
> -Travis
>
>
> On Tue, Sep 13, 2016 at 12:59 PM, Stephan Hoyer  wrote:
>
>> On Tue, Sep 13, 2016 at 10:39 AM, Nathan Goldbaum 
>> wrote:
>>
>>> I'm curious whether you have a plan to deal with the python functional
>>> call overhead. Numba gets around this by JIT-compiling python functions -
>>> is there something analogous you can do in NumPy or will this always be
>>> limited by the overhead of repeatedly calling a Python implementation of
>>> the "core" operation?
>>>
>>
>> I don't think there is any way to avoid this in NumPy proper, but that's
>> OK (it's similar to the existing overhead of vectorize).
>>
>> Numba already has guvectorize (and it's own version of vectorize as
>> well), which already does exactly this.
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>>
>
>
> --
>
> *Travis Oliphant, PhD*
> *Co-founder and CEO*
>
>
> @teoliphant
> 512-222-5440
> http://www.continuum.io
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] mail.scipy.org update

2016-09-26 Thread Ralf Gommers
On Mon, Sep 26, 2016 at 10:20 PM, Didrik Pinte  wrote:

> If all the SSL certification updates have been done properly, this message
> should go through.
>

It did, thanks Didrik!

Ralf


>
> -- Didrik
>
> On 14 September 2016 at 13:00, Didrik Pinte  wrote:
>
>> Hi everyone,
>>
>> While updating the scipy SSL certificates yesterday, it appeared that
>> filesystem of the servers is corrupted (more than likely a hardware
>> failure). The problem is restricted to one volume and impacts only the web
>> services. The mailing list/mailman service works as expected.
>>
>> We're working on restoring all the different non-functional services.
>>
>> Thanks for you patience!
>>
>> -- Didrik
>>
>
>
>
> --
> Didrik Pinte +32 475 665 668
>+44 1223 969515
> Enthought Inc.dpi...@enthought.com
> Scientific Computing Solutions   http://www.enthought.com
>
> The information contained in this message is Enthought confidential & not
> to be dissiminated to outside parties without explicit prior approval from
> sender.  This message is intended solely for the addressee(s), If you are
> not the intended recipient, please contact the sender by return e-mail and
> destroy all copies of the original message.
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] testing

2016-09-26 Thread Charles R Harris
Testing if this gets posted... Chuck
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] [7949] How to handle these deprecation Warning errors

2016-09-26 Thread Saurabh Mehta
Hi

I am working on issue #7949, and need to use "-3" switch while running
python 2.7 for my tests.
python -3 -c "import numpy as np; np.test()"

Several errors are reported and all all of them are DeprecationWarnings,
which is ok. (https://travis-ci.org/njase/numpy/jobs/162733502)

*But now these errors must be either fixed or skipped. This is where I am
facing problem. Pls suggest:*

1. *Identify that python was invoked with -3 and skip these cases*:
There seems no way to know if python was invoked with -3
sys.argv only reports about "-c" and ignores other switches


2. *Fix these issues:* All of them are about deprecated APIs and new APIs
have been introduced in python 3. Since I am using python 2.x, I don't see
a way to fix them

What to do?

Regards
Saurabh
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] [7949] How to handle these deprecation Warning errors

2016-09-26 Thread Sebastian Berg
On Mo, 2016-09-26 at 15:36 +0200, Saurabh Mehta wrote:
> Hi
> 
> I am working on issue #7949, and need to use "-3" switch while
> running python 2.7 for my tests.
> python -3 -c "import numpy as np; np.test()"
> 
> Several errors are reported and all all of them are
> DeprecationWarnings, which is ok. (https://travis-ci.org/njase/numpy/
> jobs/162733502)
> 

OK, most of them seem harmless (i.e. don't use the slice C-slot).

I think we should just get rid of the slice C-slot thing globally, the
simplest way would be to go to numpy/testing/nosetester.py, look for
things like `sup.filter(message='Not importing directory')`. Then,
maybe specific `if sys.version_info.major == 2 and sys.py3kwarning`,
just add some `sup.filter` such as:

```
if sys.version_info.major == 2 and sys.py3kwarning:
    sup.filter(DeprecationWarning, message="in 3.x, __setslice__")
    sup.filter(DeprecationWarning, message="in 3.x, __getslice__")

```
First scrolling through the errors, my guess is that the other errors
we can also silence more locally.

This silencing might also leek to scipy, but frankly I am not worried
about it for those slots. The threading warnings seem also quite noisy
(and useless), but not sure right away what the best approach for that
would be.

- Sebastian


> But now these errors must be either fixed or skipped. This is where I
> am facing problem. Pls suggest:
> 
> 1. Identify that python was invoked with -3 and skip these cases:
> There seems no way to know if python was invoked with -3
> sys.argv only reports about "-c" and ignores other switches
> 
> 
> 2. Fix these issues: All of them are about deprecated APIs and new
> APIs have been introduced in python 3. Since I am using python 2.x, I
> don't see a way to fix them
> 
> What to do?
> 
> Regards
> Saurabh
> 
> 
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion

signature.asc
Description: This is a digitally signed message part
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Parsing a file with dates to datetim64

2016-09-26 Thread Florian Lindner
Hey,

I have a file:

;Eintrittsdatum;;;
;04.03.16;;10,00 €;genehmigt
;04.03.16;;10,00 €;genehmigt


which I try to parse using

def dateToNumpyDate(s):
s = s.decode("utf-8")
ret = datetime.datetime.strptime(s, "%d.%m.%y").isoformat()
return ret

def generateMembers():
members = np.genfromtxt("test_CSC_Mitglieder.csv",
 dtype = { "names"   : ["EntryDate"],
   "formats" : ['datetime64[D]'] },
 converters = { 9 : dateToNumpyDate },
 skip_header = 1,
 delimiter = ";",
 usecols = (9))


count = members.shape[0]
y = np.linspace(1, count, count)
print(members)
print(members.dtype)
plt.plot(members["EntryDate"], y)
plt.show()


but the datatype was ignored homehow, 
generateMembers()
  File "CSC.py", line 76, in generateMembers
plt.plot(members["EntryDate"], y)
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis 
(`None`) and integer or boolean arrays are
valid indices


I also tried to print the return of dateToNumpbyData:

2016-03-04T00:00:00
2016-03-04T00:00:00
2016-03-04T00:00:00

Is there a problem with the dtype argument?

Thanks,
Florian
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] PR 8053 np.random.multinomial tolerance param

2016-09-26 Thread Alex Beloi
Hello,

 

Pull Request: https://github.com/numpy/numpy/pull/8053

 

I would like to expose a tolerance parameter for the function
numpy.random.multinomial.

 

The function `multinomial(n, pvals, size=None)` correctly raises exception
when `sum(pvals) > 1 + 1e-12` as these values should sum to 1. However,
other libraries often cannot or do not guarantee such level of precision.

 

Specifically, I have encountered issues with tensorflow function
tf.nn.softmax, which is expected to output a tensor whose values sum to 1,
but often with precision of only 1e-8. 

 

I propose to expose the `1e-12` tolerance to a non-negative float parameter
with default value `1e-12`.

 

Alex

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] PR 8053 np.random.multinomial tolerance param

2016-09-26 Thread Stephan Hoyer
I would actually be just as happy to relax the tolerance here to 1e-8
always. I doubt this would catch any fewer bugs than the current default.
In contrast, adding new parameters adds cognitive overload for everyone
encountering the function.

Also, for your use case note that tensorflow has it's own function for
generating random values from a multinomial distribution:
https://www.tensorflow.org/versions/r0.10/api_docs/python/constant_op.html#multinomial

On Mon, Sep 26, 2016 at 11:52 AM, Alex Beloi  wrote:

> Hello,
>
>
>
> Pull Request: https://github.com/numpy/numpy/pull/8053
>
>
>
> I would like to expose a tolerance parameter for the function
> numpy.random.multinomial.
>
>
>
> The function `multinomial(n, pvals, size=None)` correctly raises exception
> when `sum(pvals) > 1 + 1e-12` as these values should sum to 1. However,
> other libraries often cannot or do not guarantee such level of precision.
>
>
>
> Specifically, I have encountered issues with tensorflow function
> tf.nn.softmax, which is expected to output a tensor whose values sum to 1,
> but often with precision of only 1e-8.
>
>
>
> I propose to expose the `1e-12` tolerance to a non-negative float
> parameter with default value `1e-12`.
>
>
>
> Alex
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion