Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:10
    anntzer commented #12915
  • 12:03
    coding-krtek commented #21369
  • 09:50

    timhoffm on v3.5.x

    Backport PR #21864: Delete "Loa… Merge pull request #21865 from … (compare)

  • 09:50
    timhoffm closed #21865
  • 08:51
    meeseeksdev[bot] labeled #21865
  • 08:51
    meeseeksdev[bot] milestoned #21865
  • 08:51
    meeseeksmachine opened #21865
  • 08:51

    jklymak on main

    Delete "Load converter" example… Merge pull request #21864 from … (compare)

  • 08:50
    jklymak closed #21864
  • 08:17
    noonchen commented #11607
  • 02:01
    brobr commented #21718
  • 01:56
    timhoffm commented #21799
  • 01:46
    janash commented #21369
  • 01:44
    timhoffm labeled #12915
  • 01:44
    timhoffm closed #12915
  • 01:44
    timhoffm commented #12915
  • 01:22
    timhoffm labeled #21864
  • 01:22
    timhoffm milestoned #21864
  • 01:21
    timhoffm opened #21864
  • 01:10
    timhoffm edited #21863
hannah
@story645
GSOC is reducing scope next year (half the money & half the time expectation) https://twitter.com/pavithraes/status/1316816191235579904?s=19
Jody Klymak
@jklymak
Hi all,
Thomas A Caswell
@tacaswell
I may be a few minutes late, calling in from a different computer and apparently have to update zoom :facepalm:
Jody Klymak
@jklymak
@anntzer suggests that it would be relatively easy to vendor the agg filters, presumably w/o the 0-1 stricture which makes it a problem to deal with high-bandwidth data. OTOH, are we dead against scipy.ndimage? I've been told scipy is too big a dependancy, but is that really true in 2020? What fraction of folks do we think are installing matplotlib, but not scipy?
Ryan May
@dopplershift
It's not just that scipy is heavy weight, it's that scipy requires a FORTRAN compiler. Currently, conda-forge still can't build windows packages of scipy on windows-based CI infrastructure.
I hate the idea that we reimplement the image processing that already exists in scipy.ndimage. At the same time, scipy is still not a trivial dependency.
Jody Klymak
@jklymak
As a point of reference, skimage uses scipy.ndimage.
Currently, conda-forge still can't build windows packages of scipy on windows-based CI infrastructure.
Wow!
Ryan May
@dopplershift
Stupid FORTRAN.
Jody Klymak
@jklymak
OK, but you can install scipy from anaconda?
Ryan May
@dopplershift
That and they occassionally have manually uploaded windows builds for conda-forge. My point was more, currently our windows users can build everything from source, though I'm not sure how prevalent that is. If we depend on scipy, now getting a proper fortran compiler working with visual studio is added to the set. I have no idea whether that's too much to ask, or relevant, just pointing out that it becomes part of the stack.
Jody Klymak
@jklymak
Certainly a fortran compiler showing up in a build is a big bummer. I had to instal octave the other day for a 20 minutes chore that turned into 3 hrs of my old computer grinding away compiling a gfortran that I didn't need for anything else
Jody Klymak
@jklymak
ndimage, so far as I can tell, is all written in C. maybe vendoring it would be ugly, but is another option.
Its a bummer that it is not a standalone package...
Thomas A Caswell
@tacaswell
This was one of the motivations of stating skimage
Jody Klymak
@jklymak
skimage depends on ndimage I thought?
Thomas A Caswell
@tacaswell
I think so, there is (was atleast) a goal of eventually reversing the dependency
Jody Klymak
@jklymak
scikit-image definitely has scipy as a depedency
We vendor Agg now, so I guess I'd say vending ndimage is no worse. Regardless of today's discussion, it may be worth it to get around Agg's 0-1 restriction on the filters....
Thomas A Caswell
@tacaswell
I'm sure it would just change the problems we have, but I am a bit pessimistic....
Jody Klymak
@jklymak
Well, if you don't have to pre-clip the data, it makes the logic a lot more streamlined
Thomas A Caswell
@tacaswell
but it won't get us around having to make sure we do "the right thing" with wildly ill-conditioned user data, I have faith that floats will find some other way to miss-behave :-p
Jody Klymak
@jklymak
... yeah, but then we could blame it on ndimage ;-)
I put a winky there, but actually I think there is lots of power in us not rolling our own...
Bruno Beltran
@brunobeltran
any pointers on how to deprecate a class property? @deprecated works for properties, but not being able to call it using the class scope would technically be a change of API? and _deprecate_privatize_attribute seems to make it a property under the hood, which has the same issue
Bruno Beltran
@brunobeltran

tl;dr: if I do this

class Line2D(...):
    _validJoin = ('miter', 'round', 'bevel') 
    validJoin = _deprecate_privatize_attribute('3.4.0')

Then this no longer works

>>> Line2D.validJoin
Antony Lee
@anntzer
I think combining cbook.classproperty and deprecated can be made to work relatively easily
(untested)
I guess it's just a matter, in the implementation of deprecated, of replacing if isinstance(obj, property) by isinstance(obj, (property, classproperty)), and of changing the base class of _deprecated_property from property to type(obj)
Bruno Beltran
@brunobeltran
This is 99% of the way there, thanks @anntzer!
kirk86
@kirk86

Anyone has any idea why animation is not working in Colab?
MWE:

fig, ax = plt.subplots()

x = np.arange(0, 2*np.pi, 0.01)
line, = ax.plot(x, np.sin(x))

def init():  # only required for blitting to give a clean slate.
    line.set_ydata([np.nan] * len(x))
    return line,

def animate(i):
    line.set_ydata(np.sin(x + i / 100))  # update the data.
    return line,

ani = animation.FuncAnimation(
    fig, animate, init_func=init, interval=2, blit=True, save_count=50)

plt.show()

I've tried using the notebook backend but to no avail. The only way I could get a plot was using rc('animation', html='jshtml') and HTML(ani.to_jshtml()). But, it produces two plots and one of them requires pressing the play button which is something I don't want. I need a plot to live update. How to achieve that?

This is what I get with HTML(ani.to_jshtml())
image.png
hannah
@story645

you can remove the first image by moving

ani = animation.FuncAnimation(
    fig, animate, init_func=init, interval=2, blit=True, save_count=50)

into a new cell, and putting %%capture at the top of the first one

Jody Klymak
@jklymak
@QuLogic I guess I don't understand how to run our benchmarks.... https://github.com/matplotlib/mpl-bench
Jody Klymak
@jklymak
ok. I figured it out I think: asv
Elliott Sales de Andrade
@QuLogic
Yea, I should write a readme...
You need airspeed-velocity, and then can do asv dev to test out a benchmark
Jody Klymak
@jklymak
I did asv.run but it didn't pick up the new file. Trying asv dev
Is there somewhere I need to tell it what files to look in? I made a new benchmarks/dates.py file...
Elliott Sales de Andrade
@QuLogic
The function should be named time_*, but I don't think there are any requirements for file names
Jody Klymak
@jklymak
Hmm, I stuck it in a class. Could move it up a level
Oh, duh I didn't name then time_
That works. Thanks!
Elliott Sales de Andrade
@QuLogic
See also https://asv.readthedocs.io/en/stable/writing_benchmarks.html if you haven't found that already
kirk86
@kirk86

you can remove the first image by moving

ani = animation.FuncAnimation(
    fig, animate, init_func=init, interval=2, blit=True, save_count=50)

into a new cell, and putting %%capture at the top of the first one

Thanks!

Jody Klymak
@jklymak
There are a couple of PRs there now...
danuo
@danuo
I want to render text with ax.text() outside of the axis and it shall not effect the spacing of constrained_layout=True . How would I make ax.text invisible to spacing calculation?