Re: [Numpy-discussion] How to use user input as equation directly

2016-10-27 Thread John Ladasky
This isn't just a Numpy issue. You are interested in Python's eval(). Keep in mind that any programming language that blurs the line between code and data (many do not) has a potential security vulnerability. What if your user doesn't type "x = 2*np.sin(2*np.pi*44100*t+np.pi/2)" but instead ty

Re: [Numpy-discussion] Numpy set_printoptions, silent failure, bug?

2016-07-19 Thread John Ladasky
Thank you Juan, I've just joined GitHub and I've submitted the description of the bug. On Tue, Jul 19, 2016 at 2:55 PM, Juan Nunez-Iglesias wrote: > https://github.com/numpy/numpy/issues > > > From: John Ladasky > Reply: Discussion of Numerical Python > > D

Re: [Numpy-discussion] Numpy set_printoptions, silent failure, bug?

2016-07-19 Thread John Ladasky
Hi Robert, Thanks for your reply. If no one disagrees with you or with me that this is a Numpy bug, I would appreciate being directed to the appropriate page to submit a bug-fix request. On Tue, Jul 19, 2016 at 2:43 PM, Robert Kern wrote: > On Tue, Jul 19, 2016 at 10:41 PM, John Lada

[Numpy-discussion] Numpy set_printoptions, silent failure, bug?

2016-07-19 Thread John Ladasky
Hi there, I've been using Numpy for several years and appreciate it very much. The following minimal code has been tried on Python 3.4 and 3.5, with Numpy 1.8 and Numpy 1.11, respectively. I want to temporarily change the way that a Numpy array is printed, then change it back. import numpy as n

Re: [Numpy-discussion] Changing the numpy array into required shape

2014-08-23 Thread John Ladasky
On 08/22/2014 11:14 PM, Cleo Drakos wrote: > > How can I convert this numpy array so that its first element belongs > to (49.875N,179.625W), i.e., upper left latitude and longitude > respectively; and the last element belong to (49.625S,179.875E), i.e., > lower right latitute and longitude respe