Re: [Numpy-discussion] (no subject)

2014-09-18 Thread Ian Henriksen
. That will be the most commonly expected behavior, especially in ambiguous cases like this. -Ian Henriksen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Best way to expose std::vector to be used with numpy

2014-10-14 Thread Ian Henriksen
On Mon, Oct 13, 2014 at 8:39 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Oct 13, 2014 at 12:54 PM, Sebastian Berg sebast...@sipsolutions.net wrote: On Mo, 2014-10-13 at 13:35 +0200, Daniele Nicolodi wrote: Hello, I have a C++ application that collects float, int or

Re: [Numpy-discussion] Views of a different dtype

2015-02-03 Thread Ian Henriksen
still allowing for relaxed strides. Either way, thanks for looking into this. It's a great feature to have available. -Ian Henriksen If there are any real loopholes in expanding this functionality, then lets not do it, but we know we have at least one user unsatisfied with the current

Re: [Numpy-discussion] How to Force Storage Order

2015-03-31 Thread Ian Henriksen
ordered. You could also use np.ascontiguousarray on the output arrays, though that results in unnecessary copies that change the memory layout. Best of luck! -Ian Henriksen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org

Re: [Numpy-discussion] PR added: frozen dimensions in gufunc signatures

2015-06-22 Thread Ian Henriksen
to have. Thanks for the great work! -Ian Henriksen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Numpy, BLAS, and CBLAS questions

2015-07-13 Thread Ian Henriksen
On Mon, Jul 13, 2015 at 11:08 AM Nathaniel Smith n...@pobox.com wrote: I think that if you can make this work then it would be great (who doesn't like less code that does more?), but that as a practical matter accomplishing this may be difficult. AFAIK there simply is no way to write generic

Re: [Numpy-discussion] Numpy, BLAS, and CBLAS questions

2015-07-13 Thread Ian Henriksen
supporting at some point. As far as implementation goes, it may be helpful to look at https://github.com/numpy/numpy/pull/3642 and https://github.com/numpy/numpy/pull/4191 for the corresponding set of changes for OpenBLAS. That could be a good starting point. Thanks for bringing this up! -Ian Henriksen

Re: [Numpy-discussion] AppVeyor

2015-12-21 Thread Ian Henriksen
> > Also, am I correct that these are win64 builds only? Anyone know if it > would be easy to add win32? > It'd be really easy to add 32 bit builds. The main reason I didn't was because appveyor only gives one concurrent build job for free, and I didn't want to slow things down too much. I can

Re: [Numpy-discussion] AppVeyor

2015-12-21 Thread Ian Henriksen
> > The Python 3 build runs much faster than the Python 2. You can close and >> reopen my testing PR to check what happens if you enable the numpy project. > > I'm not sure why this is the case. MSVC 2015 is generally better about a lot of things, but it's surprising that the speed difference is

Re: [Numpy-discussion] AppVeyor

2015-12-22 Thread Ian Henriksen
On Tue, Dec 22, 2015 at 12:14 AM Ralf Gommers wrote: > That would be quite useful I think. 32/64-bit issues are mostly orthogonal > to py2/py3 ones, so may only a 32-bit Python 3.5 build to keep things fast? > Done in https://github.com/numpy/numpy/pull/6874. Hope this

Re: [Numpy-discussion] Proposal: stop providing official win32 downloads (for now)

2015-12-18 Thread Ian Henriksen
On Fri, Dec 18, 2015 at 3:27 PM Nathaniel Smith <n...@pobox.com> wrote: > On Dec 18, 2015 2:22 PM, "Ian Henriksen" < > insertinterestingnameh...@gmail.com> wrote: > > > > An appveyor setup is a great idea. An appveyor build matrix with the > > vario

Re: [Numpy-discussion] Proposal: stop providing official win32 downloads (for now)

2015-12-18 Thread Ian Henriksen
On Fri, Dec 18, 2015 at 2:51 PM Ralf Gommers wrote: > On Fri, Dec 18, 2015 at 5:55 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Fri, Dec 18, 2015 at 2:12 AM, Nathaniel Smith wrote: >> >>> Hi all, >>> >>> I'm wondering what

Re: [Numpy-discussion] Integers to integer powers, let's make a decision

2016-06-10 Thread Ian Henriksen
ll. Generally when I'm doing operations with integers, I expect integer output, regardless of floor division and overflow. There's a lot to both sides of the argument though. Python's arbitrary precision integers alleviate overflow concerns very nicely, but forcing float output for people who actually want integers is not at all ideal either. Best, Ian Henriksen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Integers to integer powers, let's make a decision

2016-06-10 Thread Ian Henriksen
ackcompat break, but 64 bit systems are much more common now, and using 32 bit integers on 64 bit windows is a bit odd. Anyway, hopefully that's not too off-topic. Best, Ian Henriksen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Deprecating silent truncation of floats when assigned to int array

2016-06-13 Thread Ian Henriksen
Personally, I think this is a great idea. +1 to more informative errors. Best, Ian Henriksen On Mon, Jun 13, 2016 at 2:11 PM Nathaniel Smith <n...@pobox.com> wrote: > It was recently pointed out: > > https://github.com/numpy/numpy/issues/7730 > > that this code sile

Re: [Numpy-discussion] ATLAS build errors

2016-03-28 Thread Ian Henriksen
if that were the case here too. In general, you can't expect Linux distros to have a uniform shared object interface for LAPACK, so you don't gain much by using the version that ships with CentOS 5 beyond not having to compile it all yourself. It might be better to use a newer LAPACK built from source with the older toolchains already there. Best, -Ian Henriksen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-06 Thread Ian Henriksen
n the fact that broadcasting usually prepends ones to fill in missing dimensions and the fact that our current linear algebra semantics often treat rows as columns, but making 1-D arrays into rows makes a lot of sense as far as user experience goes. Great ideas everyone! Best, -Ian Henriksen

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-07 Thread Ian Henriksen
mes difficult to find. This error isn't necessarily unique to beginners either. It's a common typo that catches intermediate users who know about broadcasting semantics but weren't keeping close enough track of the dimensionality of the different intermediate expressions in t

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-07 Thread Ian Henriksen
On Thu, Apr 7, 2016 at 12:18 PM Chris Barker <chris.bar...@noaa.gov> wrote: > On Thu, Apr 7, 2016 at 10:00 AM, Ian Henriksen < > insertinterestingnameh...@gmail.com> wrote: > >> Here's another example that I've seen catch people now and again. >> >

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-07 Thread Ian Henriksen
On Thu, Apr 7, 2016 at 12:31 PM wrote: > write unit tests with non square 2d arrays and the exception / test error > shows up fast. > > Josef > > Absolutely, but good programming practices don't totally obviate helpful error messages. Best, -Ian

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-07 Thread Ian Henriksen
On Thu, Apr 7, 2016 at 1:53 PM <josef.p...@gmail.com> wrote: > On Thu, Apr 7, 2016 at 3:26 PM, Ian Henriksen < > insertinterestingnameh...@gmail.com> wrote: > >> On Thu, Apr 7, 2016 at 12:31 PM <josef.p...@gmail.com> wrote: >> >>> write unit t

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-08 Thread Ian Henriksen
, this would be valid: a @ b.T2 It makes the intent much clearer. This helps readability even more when you're trying to put together something that follows a larger equation while still broadcasting correctly. Does this help make the use cases a bit clearer? Best, -Ian Henriksen __

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-11 Thread Ian Henriksen
On Mon, Apr 11, 2016 at 5:24 PM Chris Barker <chris.bar...@noaa.gov> wrote: > On Fri, Apr 8, 2016 at 4:37 PM, Ian Henriksen < > insertinterestingnameh...@gmail.com> wrote: > > >> If we introduced the T2 syntax, this would be valid: >> >> a @ b

Re: [Numpy-discussion] ndarray.T2 for 2D transpose

2016-04-08 Thread Ian Henriksen
f, but they both provide nice syntax sugar for common reshape operations. It seems like it would cover all the needed cases for simplifying expressions involving matrix multiplication. It's not totally clear what the semantics should be for higher dimensional arrays or 2D arrays that already have a shape incomp

Re: [Numpy-discussion] offset in fill diagonal

2017-01-21 Thread Ian Henriksen
a[1:], b) np.fill_diagonal(a[:,1:], -b) yields array([[ 0., -1., 0., 0.], [ 1., 0., -1., 0.], [ 0., 1., 0., -1.], [ 0., 0., 1., 0.]]) Hope this helps, Ian Henriksen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] State-of-the-art to use a C/C++ library from Python

2016-08-31 Thread Ian Henriksen
chiming in on the discussion. I suppose the moral of the story is that there's still not a clear cut "best" way of building wrappers and that your mileage may vary depending on what features you need. Thanks, Ian Henriksen ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] State-of-the-art to use a C/C++ library from Python

2016-08-31 Thread Ian Henriksen
or variadic templates will often require a some extra C++ code to work them in to something that Cython can understand. In my experience, those particular limitations haven't been that hard to work with. Best, Ian Henriksen On Wed, Aug 31, 2016 at 12:20 PM Jason Newton <nev...@gmail.com> wrote: &g