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

Method _is_finite

lib/matplotlib/transforms.py:380–401  ·  view source on GitHub ↗

Return whether the bounding box is finite and not degenerate to a single point. We count the box as finite if neither width nor height are infinite and at least one direction is non-zero; i.e. a point is not finite, but a horizontal or vertical line is.

(self)

Source from the content-addressed store, hash-verified

378 raise NotImplementedError
379
380 def _is_finite(self):
381 """
382 Return whether the bounding box is finite and not degenerate to a
383 single point.
384
385 We count the box as finite if neither width nor height are infinite
386 and at least one direction is non-zero; i.e. a point is not finite,
387 but a horizontal or vertical line is.
388
389 .. versionadded:: 3.11
390
391 Notes
392 -----
393 We keep this private for now because concise naming is hard and
394 because we are not sure how universal the concept is. It is
395 currently used only for filtering bboxes to be included in
396 tightbbox calculation, but I'm unsure whether single points
397 should be included there as well.
398 """
399 width = self.width
400 height = self.height
401 return (width > 0 or height > 0) and width < np.inf and height < np.inf
402
403 def containsx(self, x):
404 """

Callers 3

get_tightbboxMethod · 0.80
get_tightbboxMethod · 0.80
test_bbox_is_finiteFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_bbox_is_finiteFunction · 0.64