From jni.soma at gmail.com Tue Oct 2 06:01:06 2018 From: jni.soma at gmail.com (Juan Nunez-Iglesias) Date: Tue, 02 Oct 2018 20:01:06 +1000 Subject: [SciPy-User] Announcement: scikit-image 0.14.1 Message-ID: <1538474466.4032263.1527649768.1CB91589@webmail.messagingengine.com> Announcement: scikit-image 0.14.1 ================================= Hi all, We're happy to announce the release of scikit-image v0.14.1! scikit-image is an image processing toolbox for SciPy that includes algorithmsfor segmentation, geometric transformations, color space manipulation, analysis, filtering, morphology, feature detection, and more. This is our first release under our Long Term Support for 0.14 policy. As areminder, 0.14 is the last release to support Python 2.7, but it will beupdated with bug fixes and popular features until January 1st, 2020. Wheels are available right now on PyPI for Windows, Mac, and Linux. Conda packages will be available soon on conda-forge. This release contains the following changes from 0.14.0: Bug fixes --------- - ``skimage.color.adapt_rgb`` was applying input functions to the wrong axis (#3097) - ``CollectionViewer`` now indexes correctly (it had been broken by an update to NumPy indexing) (#3288) - Handle deprecated indexing-by-list and NumPy ``matrix`` from NumPy 1.15 (#3238, #3242, #3292) - Fix incorrect inertia tensor calculation (#3303) (Special thanks to JP Cornil for reporting this bug and for their patient help with this fix) - Fix missing comma in ``__all__`` listing of ``moments_coord_central``, so it and ``moments_normalized`` can now be correctly imported from the ``measure`` namespace (#3374) - Fix background color in ``label2rgb(..., kind='avg')`` (#3280) - Fix an UnboundLocalVariable error when an image consisting of all NaNs was passed to ``filters.threshold_li`` (#3402) Enhancements ------------ - "Reflect" mode in transforms now works fine when an image dimension has size 1 (#3174) - ``img_as_float`` now allows single-precision (32-bit) float arrays to pass through unmodified, rather than being up-converted to 64-bit (#3110, #3052, #3391) - Speed up rgb2gray computation (#3187) - The scikit-image viewer now works with different PyQt versions (#3157)- The ``cycle_spin`` function for enhanced denoising works single- threaded when dask is not installed now (#3218) - scikit-image's ``io`` module will no longer inadvertently set the matplotlib backend when imported (#3243) - Fix deprecated ``get`` keyword from dask in favor of ``scheduler`` (#3366)- Add missing ``cval`` parameter to threshold_local (#3370) API changes ----------- - Remove deprecated ``dynamic_range`` in ``measure.compare_psnr`` (#3313) Documentation ------------- - Improve the documentation on data locality (#3127) - Improve the documentation on dealing with video (#3176) - Update broken link for Canny filter documentation (#3276) - Fix incorrect documentation for the ``center`` parameter of ``skimage.transform.rotate`` (#3341) - Fix incorrect formatting of docstring in ``measure.profile_line`` (#3236) Build process / development --------------------------- - Ensure Cython is 0.23.4 or newer (#3171) - Suppress warnings during testing (#3143) - Fix skimage.test (#3152) - Don't upload artifacts to AppVeyor (there is no way to delete them) (#3315)- Remove ``import *`` from the scikit-image package root (#3265) - Allow named non-core contributors to issue MeeseeksDev commands (#3357, #3358) - Add testing in Python 3.7 (#3359) - Add license file to the binary distribution (#3322) - ``lookfor`` is no longer defined in ``__init__.py`` but rather imported to it (#3162) - Add ``pyproject.toml`` to ensure Cython is present before building (#3295)- Add explicit Python version Trove classifiers for PyPI (#3417) - Ignore known test failures in 32-bit releases, allowing 32-bit wheel builds (#3434) - Ignore failure to raise floating point warnings on certain ARM platforms (#3337) - Fix tests to be compatible with PyWavelets 1.0 (#3406) Credits ------- Made with commits from (alphabetical by last name): - Fran?ois Boulogne - Genevieve Buckley - Sean Budd - Matthias Bussonnier - Sarkis Dallakian - Christoph Deil - Fran?ois-Michel De Rainville - Emmanuelle Gouillart - Yaroslav Halchenko - Mark Harfouche - Jonathan Helmus - Gregory Lee - @Legodev - Matt McCormick - Juan Nunez-Iglesias - Egor Panfilov - Jesse Pangburn - Johannes Sch?nberger - Stefan van der Walt - Hugo VK Reviewed by (alphabetical by last name): - Fran?ois Boulogne - Emmanuelle Gouillart - Mark Harfouche - Juan Nunez-Iglesias - Egor Panfilov - St?fan van der Walt - Josh Warner And with the special support of [MeeseeksDev] (https://github.com/MeeseeksBox),created by Matthias Bussonnier -------------- next part -------------- An HTML attachment was scrubbed... URL: From nil.goyette at imeka.ca Thu Oct 4 16:54:43 2018 From: nil.goyette at imeka.ca (Nil Goyette) Date: Thu, 4 Oct 2018 16:54:43 -0400 Subject: [SciPy-User] Cubic interpolation Message-ID: <9761b724-99ac-3e06-b214-69b27cf4e9d1@imeka.ca> Hi all, I'm trying to port `interpolation.affine_transform` [1] to another langage and I have a question about your algorithm. I successfully ported order 1 (linear) interpolation from another lib, but I failed on order 3 (cubic). I tried reading the interpolation code (zoom shift) [2] but it's no simple task. So, I took vtk implementation [3] and ported it, but I can't get your results. I was surprised because it's a mathematical formula, it should give the same result wathever the algorithm. So, my question is: *is there something special with SciPy's cubic interpolation?* I don't get the feeling that the code fits the description in wikipedia [4]. Also, I saw the `spline_filter` function, I ported it and but I still can't get the same results, disabled or not. Nil Goyette [1] https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.interpolation.affine_transform.html [2] https://github.com/scipy/scipy/blob/master/scipy/ndimage/src/ni_interpolation.c#L573 [3] https://gitlab.kitware.com/vtk/vtk/blob/master/Imaging/Core/vtkImageInterpolator.cxx#L325 [4] https://en.wikipedia.org/wiki/Tricubic_interpolation -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.molnar at sbcglobal.net Tue Oct 9 14:40:14 2018 From: s.molnar at sbcglobal.net (Stephen P. Molnar) Date: Tue, 9 Oct 2018 14:40:14 -0400 Subject: [SciPy-User] Plot Baseline Problem Message-ID: <004a01d45fff$8593c460$90bb4d20$@sbcglobal.net> I have attached code that I wrote to plot Infrared spectra. The x axis of the plot (attached) runs from 400 to 4000, which is the range of the infrared portion of the electromagnetic spectrum. The spectrum of the sample runs from 400 to 2800. My question is how can I expand the data plot from 2800 to 4000 (the intensity is 0.0 in that range)? Of course this is not the case for each spectrum The only thing I've found via Google is https://stackoverflow.com/questions/47190853/extend-baseline-of-stem-plot- in-matplotlib-to-axis-limits. I appreciate your assistance. Thanks in advance. Stephen P. Molnar, Ph.D. Life is a fuzzy set www.molecular-modeling.net Stochastic and Multivariate (614)312-7528 (c) Skype: smolnar1 -------------- next part -------------- A non-text attachment was scrubbed... Name: InfraredPlots_44a.py Type: application/octet-stream Size: 744 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 20901 bytes Desc: not available URL: From guillaume at damcb.com Tue Oct 9 15:32:36 2018 From: guillaume at damcb.com (Guillaume Gay) Date: Tue, 9 Oct 2018 21:32:36 +0200 Subject: [SciPy-User] Plot Baseline Problem In-Reply-To: <004a01d45fff$8593c460$90bb4d20$@sbcglobal.net> References: <004a01d45fff$8593c460$90bb4d20$@sbcglobal.net> Message-ID: <6fba89cd-5086-738b-0df7-c2502636129d@damcb.com> If you append a (4000, 0) entry at the end of your data, your line will be expanded. Placing this after you read your data should do the trick: ```python data = np.concatenate((data, [[0, 4000]])) ``` Guillaume Le 09/10/2018 ? 20:40, Stephen P. Molnar a ?crit?: > I have attached code that I wrote to plot Infrared spectra. The x axis of > the plot (attached) runs from 400 to 4000, which is the range of the > infrared portion of the electromagnetic spectrum. > > The spectrum of the sample runs from 400 to 2800. > > My question is how can I expand the data plot from 2800 to 4000 (the > intensity is 0.0 in that range)? Of course this is not the case for each > spectrum > > The only thing I've found via Google is > https://stackoverflow.com/questions/47190853/extend-baseline-of-stem-plot- > in-matplotlib-to-axis-limits. > > I appreciate your assistance. > > Thanks in advance. > > Stephen P. Molnar, Ph.D. Life is a fuzzy set > www.molecular-modeling.net Stochastic and Multivariate > (614)312-7528 (c) > Skype: smolnar1 > > > > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user -- Guillaume Gay, PhD Morphg?nie Logiciels SAS http://morphogenie.fr 12 rue Camoin Jeune 13004 Marseille +336 51 95 94 00 -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.molnar at sbcglobal.net Tue Oct 9 18:16:51 2018 From: s.molnar at sbcglobal.net (Stephen P. Molnar) Date: Tue, 9 Oct 2018 18:16:51 -0400 Subject: [SciPy-User] Plot Baseline Problem In-Reply-To: <6fba89cd-5086-738b-0df7-c2502636129d@damcb.com> References: <004a01d45fff$8593c460$90bb4d20$@sbcglobal.net> <6fba89cd-5086-738b-0df7-c2502636129d@damcb.com> Message-ID: <000701d4601d$c8097c90$581c75b0$@sbcglobal.net> Many thanks for your reply. Appending, not just (4000, 0), but the (last xvalue of the curve 0.0). solved the problem. Stephen P. Molnar, Ph.D. Life is a fuzzy set www.molecular-modeling.net Stochastic and Multivariate (614)312-7528 (c) Skype: smolnar1 From: SciPy-User On Behalf Of Guillaume Gay Sent: Tuesday, October 9, 2018 3:33 PM To: scipy-user at python.org Subject: Re: [SciPy-User] Plot Baseline Problem If you append a (4000, 0) entry at the end of your data, your line will be expanded. Placing this after you read your data should do the trick: ```python data = np.concatenate((data, [[0, 4000]])) ``` Guillaume Le 09/10/2018 ? 20:40, Stephen P. Molnar a ?crit : I have attached code that I wrote to plot Infrared spectra. The x axis of the plot (attached) runs from 400 to 4000, which is the range of the infrared portion of the electromagnetic spectrum. The spectrum of the sample runs from 400 to 2800. My question is how can I expand the data plot from 2800 to 4000 (the intensity is 0.0 in that range)? Of course this is not the case for each spectrum The only thing I've found via Google is https://stackoverflow.com/questions/47190853/extend-baseline-of-stem-plot- in-matplotlib-to-axis-limits. I appreciate your assistance. Thanks in advance. Stephen P. Molnar, Ph.D. Life is a fuzzy set www.molecular-modeling.net Stochastic and Multivariate (614)312-7528 (c) Skype: smolnar1 _______________________________________________ SciPy-User mailing list SciPy-User at python.org https://mail.python.org/mailman/listinfo/scipy-user -- Guillaume Gay, PhD Morphg?nie Logiciels SAS http://morphogenie.fr 12 rue Camoin Jeune 13004 Marseille +336 51 95 94 00 -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlesr.harris at gmail.com Mon Oct 22 14:06:53 2018 From: charlesr.harris at gmail.com (Charles R Harris) Date: Mon, 22 Oct 2018 12:06:53 -0600 Subject: [SciPy-User] NumPy 1.15.3 release Message-ID: Hi All, On behalf of the NumPy team, I am pleased to announce the release of NumPy 1.15.3. This is a bugfix release for bugs and regressions reported following the 1.15.2 release. The most noticeable fix is probably for the memory leak encountered when slicing classes derived from Numpy. The Python versions supported by this release are 2.7, 3.4-3.7. Wheels for this release can be downloaded from PyPI , source archives are available from Github . Compatibility Note ================== The NumPy 1.15.x OS X wheels released on PyPI no longer contain 32-bit binaries. That will also be the case in future releases. See `#11625 `__ for the related discussion. Those needing 32-bit support should look elsewhere or build from source. Contributors ============ A total of 7 people contributed to this release. People with a "+" by their names contributed a patch for the first time. * Allan Haldane * Charles Harris * Jeroen Demeyer * Kevin Sheppard * Matthew Bowden + * Matti Picus * Tyler Reddy Pull requests merged ==================== A total of 12 pull requests were merged for this release. * `#12080 `__: MAINT: Blacklist some MSVC complex functions. * `#12083 `__: TST: Add azure CI testing to 1.15.x branch. * `#12084 `__: BUG: test_path() now uses Path.resolve() * `#12085 `__: TST, MAINT: Fix some failing tests on azure-pipelines mac and... * `#12187 `__: BUG: Fix memory leak in mapping.c * `#12188 `__: BUG: Allow boolean subtract in histogram * `#12189 `__: BUG: Fix in-place permutation * `#12190 `__: BUG: limit default for get_num_build_jobs() to 8 * `#12191 `__: BUG: OBJECT_to_* should check for errors * `#12192 `__: DOC: Prepare for NumPy 1.15.3 release. * `#12237 `__: BUG: Fix MaskedArray fill_value type conversion. * `#12238 `__: TST: Backport azure-pipeline testing fixes for Mac Cheers, Charles Harris -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarvis.wyatt at gmx.com Thu Oct 25 12:35:45 2018 From: jarvis.wyatt at gmx.com (Jarvis Wyatt) Date: Thu, 25 Oct 2018 18:35:45 +0200 Subject: [SciPy-User] y limit and Bessel function plot to file Message-ID: Hello! I am new to SciPy, and with only a basic knowledge about Python. Using Python 3, I am considering the code in this page http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/hybrid-latex/examples/example-04.pdf It has been written for the Bessel function of the first kind. I am trying to adapt it for the Bessel function of the second kind. Being interested only in generating an output file, the useful lines in my case are just: #!/usr/bin/python3 import numpy as np import scipy.special as sp x = np.linspace(0, 15, 500) np.savetxt('example-04.txt',list( zip(x,sp.yn(0,x),sp.yn(1,x),sp.yn(2,x), sp.yn(3,x),sp.yn(4,x),sp.yn(5,x))), fmt="% .10e") I have used the special function yn instead of jv. This is the `example-04.txt' output file: https://pastebin.com/xfCMQ4cH (first line is `0.0000000000e+00 -inf -inf -inf -inf -inf -inf'!) And this is the image generated using example-04.txt in LaTeX: https://imagebin.ca/v/4KKebbscyqSr How to limit the output y range? I am interested in particular in y values between -2 and 1. With mathplotlib, it would be for example `plt.ylim((-2, 1))'. But what about scipy? Thank you anyway! Jarvis