[SciPy-Dev] Boundary Value Problem solver for inclusion in SciPy

David Pugh david.pugh at maths.ox.ac.uk
Wed Oct 7 09:49:16 EDT 2015


All,

I am developing a pure-python (i.e., no external fortran/C dependencies)
two-point boundary value solver tentatively called pyCollocation
<https://github.com/davidrpugh/pyCollocation> and I am writing to gauge the
level of interest in eventually including the solver in SciPy.

v/r,

Dr. David R. Pugh
Post-doctoral research fellow
INET Oxford
Mathematical Institute
Oxford University

On Wed, Oct 7, 2015 at 1:00 PM, <scipy-dev-request at scipy.org> wrote:

> Send SciPy-Dev mailing list submissions to
>         scipy-dev at scipy.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.scipy.org/mailman/listinfo/scipy-dev
> or, via email, send a message with subject or body 'help' to
>         scipy-dev-request at scipy.org
>
> You can reach the person managing the list at
>         scipy-dev-owner at scipy.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of SciPy-Dev digest..."
>
>
> Today's Topics:
>
>    1. Re: [Numpy-discussion] Numpy 1.10.0 release (Da?id)
>    2. Pull Request #5318 (Henry Herbol)
>    3. Scipy.io.savemat optimization issue. (Jamie Tsao)
>    4. Re: [Numpy-discussion] Numpy 1.10.0 release (Julian Taylor)
>    5. Re: [Numpy-discussion] Numpy 1.10.0 release (Julian Taylor)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 6 Oct 2015 14:08:36 +0200
> From: Da?id <davidmenhur at gmail.com>
> To: Discussion of Numerical Python <numpy-discussion at scipy.org>
> Cc: SciPy Users List <scipy-user at scipy.org>, SciPy Developers List
>         <scipy-dev at scipy.org>
> Subject: Re: [SciPy-Dev] [Numpy-discussion] Numpy 1.10.0 release
> Message-ID:
>         <CAJhcF=
> 1PDQQUukR4Fdby+1ygsJeLNZRFyRVFYVAzDhueAgM06w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I don't get any failures on Fedora 22. I have installed it with pip,
> setting my CFLAGS to "-march=core-avx-i -O2 -pipe -mtune=native" and
> linking against openblas.
>
> With the new Numpy, Scipy full suite shows two errors, I am sorry I didn't
> think of running that in the RC phase:
>
> ======================================================================
> FAIL: test_weighting (test_stats.TestHistogram)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
>
> "/home/david/.local/virtualenv/py27/lib/python2.7/site-packages/scipy/stats/tests/test_stats.py",
> line 892, in test_weighting
>     decimal=2)
>   File
>
> "/home/david/.local/virtualenv/py27/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 886, in assert_array_almost_equal
>     precision=decimal)
>   File
>
> "/home/david/.local/virtualenv/py27/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 708, in assert_array_compare
>     raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 2 decimals
>
> (mismatch 40.0%)
>  x: array([   4. ,    0. ,    4.5,   -0.9,    0. ,    0.3,  110.2,    0. ,
>           0. ,   42. ])
>  y: array([   4. ,    0. ,    4.5,   -0.9,    0.3,    0. ,    7. ,  103.2,
>           0. ,   42. ])
>
> ======================================================================
> FAIL: test_nanmedian_all_axis (test_stats.TestNanFunc)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
>
> "/home/david/.local/virtualenv/py27/lib/python2.7/site-packages/scipy/stats/tests/test_stats.py",
> line 226, in test_nanmedian_all_axis
>     assert_equal(len(w), 4)
>   File
>
> "/home/david/.local/virtualenv/py27/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 354, in assert_equal
>     raise AssertionError(msg)
> AssertionError:
> Items are not equal:
>  ACTUAL: 1
>  DESIRED: 4
>
> I am almost sure these errors weren't there before.
>
> On 6 October 2015 at 13:53, Neal Becker <ndbecker2 at gmail.com> wrote:
>
> > 1 test failure:
> >
> > FAIL: test_blasdot.test_blasdot_used
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in
> > runTest
> >     self.test(*self.arg)
> >   File "/home/nbecker/.local/lib/python2.7/site-
> > packages/numpy/testing/decorators.py", line 146, in skipper_func
> >     return f(*args, **kwargs)
> >   File "/home/nbecker/.local/lib/python2.7/site-
> > packages/numpy/core/tests/test_blasdot.py", line 31, in test_blasdot_used
> >     assert_(dot is _dotblas.dot)
> >   File "/home/nbecker/.local/lib/python2.7/site-
> > packages/numpy/testing/utils.py", line 53, in assert_
> >     raise AssertionError(smsg)
> > AssertionError
> >
> >
> > _______________________________________________
> > NumPy-Discussion mailing list
> > NumPy-Discussion at scipy.org
> > https://mail.scipy.org/mailman/listinfo/numpy-discussion
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.scipy.org/pipermail/scipy-dev/attachments/20151006/da0662db/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 6 Oct 2015 18:15:13 -0400
> From: Henry Herbol <hherbol at gmail.com>
> To: scipy-dev at scipy.org
> Subject: [SciPy-Dev] Pull Request #5318
> Message-ID:
>         <CADzNQgnMe5Qh0rR1kB5rNf=R3hvbwF=
> MOxiH4nFRo_iujmiU8A at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
>  To Whomever is Interested,
>
>     I have submitted a Pull Request for an optimization (minimization)
> method.  It involves an adaptation of the Broyden-Fletcher-Goldfarb-Shanno
> (BFGS) algorithm in which the line search step is skipped.  This was done
> because there are times in which optimization is required independent of
> the target function, and there was no code in the current Scipy.optimize
> methods that accomodated this.  The method employed took advantage of the
> BFGS(Hess) algorithm touched on by Sheppard et al. (ref here
> <http://theory.cm.utexas.edu/henkelman/pubs/sheppard08_134106.pdf>) and
> adjusts the step size of alpha (by a user defined beta parameter) instead
> of maintaining a small alpha.
>
> Henry Herbol
>
> P.S. If this was not the way I was supposed to address the scipy-dev
> mailing list as described here
> <http://docs.scipy.org/doc/scipy/reference/hacking.html>, I'm sorry for
> misusing the e-mail.
>
> --
> Contact E-mail: hherbol at gmail.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.scipy.org/pipermail/scipy-dev/attachments/20151006/8f48649a/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 6 Oct 2015 22:31:47 -0700
> From: Jamie Tsao <superscript92 at yahoo.com>
> To: "scipy-dev at scipy.org" <scipy-dev at scipy.org>
> Subject: [SciPy-Dev] Scipy.io.savemat optimization issue.
> Message-ID:
>         <
> 1444195907.71757.YahooMailAndroidMobile at web122904.mail.ne1.yahoo.com>
> Content-Type: text/plain; charset="us-ascii"
>
> I was attempting to add an optimization to help save some memory from
> using savemat along with my other commits attempting to fix a bug
> concerning compression with zlib. The optimization uses an np.array's data
> attribute, which in python 2.7 is a buffer. This is nice, because in the
> case the array is Fortran contiguous (much so with 1D arrays unless created
> from .real or .imag from complex arrays), then I can just pass the data
> buffer to file.write() without using much memory. I.e. a real sparse matrix
> will at most use 133% of the matrices memory to save it to disk. And even
> if it isn't Fortran compliant, I would just do as originally done: use
> tostring() to achieve the bytes in Fortran order.
>
>
> But then comes python 3. Using python 3.4, I found that now np.array.data
> is not a buffer but a memoryview. Unfortunately, the memoryview doesn't
> have the same ability to grab the underlying bytes in the same manner, so
> file.write() won't write it correctly. Furthermore, file.write() only
> accepts strings, not bytes. Hence, I would have to do something like
> str(bytes(arr.data)) to pass it and save to disk, which isn't as good as
> calling tostring(). What should I do to get around this?
>
>
> My failed pull request is here, where the last commit concerns this
> problem: http://www.github.com/scipy/scipy/pull/5325
>
>
>
>
> On a side note, is my approach to byte counting fine? I was hoping that it
> will no longer need to seek around, which helps out a lot with compression,
> but my current code does this even without compression. Originally, I was
> afraid the running time would be twice as long (although I claim not many
> will repeatedly use savemat to the point of it being a bottleneck), but it
> turns out its runtime is nearly the same. Weird?
>
>
> Lastly, I didn't add any test cases. The only bug I fixed was concerning
> compressing down a >2GB (in my case, sparse) matrix, but I don't want test
> cases to create massive matrices and use up tons of memory.
>
>
> -Jamie Tsao
>
> Sent from Yahoo Mail on Android
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://mail.scipy.org/pipermail/scipy-dev/attachments/20151006/9e0748ec/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Wed, 7 Oct 2015 13:30:18 +0200
> From: Julian Taylor <jtaylor.debian at googlemail.com>
> To: Discussion of Numerical Python <numpy-discussion at scipy.org>
> Cc: scipy-user at scipy.org, scipy-dev at scipy.org
> Subject: Re: [SciPy-Dev] [Numpy-discussion] Numpy 1.10.0 release
> Message-ID: <5615024A.2020403 at googlemail.com>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> On 10/06/2015 01:45 PM, Neal Becker wrote:
> > Are extra_compile_args actually used in all compile steps?
>
> extra_compile_args is not used by numpy, its to support some third party
> use case I never understood.
> As the typical site.cfg used by numpy only contains binaries that are
> never compiled by numpy itself it should have no effect on anything.
>
> > CFLAGS='-march=native -O3' python setup.py build
> >
> > Does seem to use my CFLAGS, as it always did on previous numpy versions.
> >
>
> still seems to work for me, though the preferred variable is OPT= as
> CFLAGS will contain a bunch of other stuff related to building python
> extensions themselves (e.g. -fno-strict-aliasing)
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 7 Oct 2015 13:40:46 +0200
> From: Julian Taylor <jtaylor.debian at googlemail.com>
> To: SciPy Developers List <scipy-dev at scipy.org>, Discussion of
>         Numerical Python <numpy-discussion at scipy.org>
> Cc: SciPy Users List <scipy-user at scipy.org>
> Subject: Re: [SciPy-Dev] [Numpy-discussion] Numpy 1.10.0 release
> Message-ID: <561504BE.50500 at googlemail.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> On 10/06/2015 02:08 PM, Da?id wrote:
> > I don't get any failures on Fedora 22. I have installed it with pip,
> > setting my CFLAGS to "-march=core-avx-i -O2 -pipe -mtune=native" and
> > linking against openblas.
> >
> > With the new Numpy, Scipy full suite shows two errors, I am sorry I
> > didn't think of running that in the RC phase:
>  > ======================================================================
>  > FAIL: test_weighting (test_stats.TestHistogram)
>
> this is a known issue see scipy/scipy/#5148
> It can most likely be ignored as the scipy test is too sensitive to
> floating point rounding.
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
> ------------------------------
>
> End of SciPy-Dev Digest, Vol 144, Issue 7
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20151007/94b9d97e/attachment.html>


More information about the SciPy-Dev mailing list