Re: [Numpy-discussion] linspaces

2018-01-27 Thread Paul Hobson
I'm not sure I understand the question, but in python, you can get the first and elements of most types of sequences with e.g., X[0] and Y[-1], respectively. Is the second part of your question just a dot product? On Sat, Jan 27, 2018 at 10:07 PM, Vincent Douce Mathoscope < mathosc...@netcourrie

[Numpy-discussion] linspaces

2018-01-27 Thread Vincent Douce Mathoscope
hi i have 2 questions - i have a parametric plot : T=np.linespace(things) X=f(T)*np.cos(T) Y=f(T)*np.sin(T) i would like to get the first and the last point of this polar curve in the specs of "linspace" (https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html

Re: [Numpy-discussion] Setting custom dtypes and 1.14

2018-01-27 Thread Allan Haldane
On 01/26/2018 06:01 PM, josef.p...@gmail.com wrote: I thought recarrays were pretty cool back in the day, but pandas is a much better option. So I pretty much only use structured arrays for data exchange with C code My impression is that this turns into a deprecate recarrays

Re: [Numpy-discussion] Multiple-field indexing: view vs copy in 1.14+

2018-01-27 Thread Allan Haldane
On 01/25/2018 03:56 PM, josef.p...@gmail.com wrote: On Thu, Jan 25, 2018 at 1:49 PM, Marten van Kerkwijk mailto:m.h.vankerkw...@gmail.com>> wrote: On Thu, Jan 25, 2018 at 1:16 PM, Stefan van der Walt mailto:stef...@berkeley.edu>> wrote: > On Mon, 22 Jan 2018 10:11:08 -0500, Marte

[Numpy-discussion] runtime warning in linalg.det

2018-01-27 Thread josef . pktd
I'm trying to figure out some warnings in the statsmodels test suite Why do the following raise RuntimeWarnings? np.linalg.det(np.ones((3,3))) C:\...\python-3.4.4.amd64\lib\site-packages\numpy\linalg\linalg.py:1776: RuntimeWarning: invalid value encountered in det r = _umath_linalg.det(a, sig

Re: [Numpy-discussion] Using np.frombuffer and cffi.buffer on array of C structs (problem with struct member padding)

2018-01-27 Thread Joe
Thanks for your help on this! This solved my issue. Am 25.01.2018 um 19:01 schrieb Allan Haldane: There is a new section discussing alignment in the numpy 1.14 structured array docs, which has some hints about interfacing with C structs. These new 1.14 docs are not online yet on scipy.org, but