MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / within_grid

Method within_grid

lib/matplotlib/streamplot.py:420–424  ·  view source on GitHub ↗

Return whether (*xi*, *yi*) is a valid index of the grid.

(self, xi, yi)

Source from the content-addressed store, hash-verified

418 return self.ny, self.nx
419
420 def within_grid(self, xi, yi):
421 """Return whether (*xi*, *yi*) is a valid index of the grid."""
422 # Note that xi/yi can be floats; so, for example, we can't simply check
423 # `xi < self.nx` since *xi* can be `self.nx - 1 < xi < self.nx`
424 return 0 <= xi <= self.nx - 1 and 0 <= yi <= self.ny - 1
425
426
427class StreamMask:

Callers 3

update_trajectoryMethod · 0.80
forward_timeFunction · 0.80
_integrate_rk12Function · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected