[Numpy-discussion] Numpy scalar integers to negative scalar integer powers.

2016-10-28 Thread Charles R Harris
Hi All, I've put up a PR to deal with the numpy scalar integer powers at https://github.com/numpy/numpy/pull/8221. Note that for now everything goes through the np.power function. Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

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

2016-10-28 Thread Robert McLeod
On Thu, Oct 27, 2016 at 11:35 PM, Benjamin Root wrote: > Perhaps the numexpr package might be safer? Not exactly meant for this > situation (meant for optimizations), but the evaluator is pretty darn safe. > > It would not be able to evaluate something like 'np.arange(50)'

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

2016-10-28 Thread Ben Rowland
It is important to bear in mind where the code is being run - if this is something running on a researcher’s own system, they almost certainly have lots of other ways of messing it up. These kind of security vulnerabilities are normally only relevant when you are running code that came from

Re: [Numpy-discussion] padding options for diff

2016-10-28 Thread Marten van Kerkwijk
Matthew has made what looks like a very nice implementation of padding in np.diff in https://github.com/numpy/numpy/pull/8206. I raised two general questions about desired behaviour there that Matthew thought we should put out on the mailiing list as well. This indeed seemed a good opportunity to