kplot 1.1.29__tar.gz → 1.1.31__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kplot
3
- Version: 1.1.29
3
+ Version: 1.1.31
4
4
  Summary: a matplotlib wrapper for keyan :-)
5
5
  Author: Keyan Gootkin
6
6
  Author-email: Keyan Gootkin <keyangootkin@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kplot"
3
- version = "1.1.29"
3
+ version = "1.1.31"
4
4
  description = "a matplotlib wrapper for keyan :-)"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -48,7 +48,7 @@ default_cmap = cm.plasma
48
48
  # >-|===|> Functions <|===|-<
49
49
  # !==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==
50
50
  def auto_norm(
51
- norm: str,
51
+ norm: str,
52
52
  frames: Optional[NDArray] = None,
53
53
  vmin: Optional[Number] = None,
54
54
  vcenter: Optional[Number] = None,
@@ -72,14 +72,16 @@ def auto_norm(
72
72
  if type(norm) in Cmap.types: return norm
73
73
  frames = frames[(-inf < frames)&(frames < inf)]
74
74
  # set min/max
75
- match (vmin, vmax, saturate):
76
- case (None, None, None):
77
- low, high = nanmin(frames), nanmax(frames)
78
- case (x1, x2, None) if all([type(xi) in Number.types for xi in (x1, x2)]):
75
+ match (frames, vmin, vmax, saturate):
76
+ # case (ScalarField(), *_):
77
+ # low, high = frames.extrema
78
+ case (_, x1, x2, _) if all([type(xi) in Number.types for xi in (x1, x2)]):
79
79
  low, high = vmin, vmax
80
- case (None, None, x) if type(x) in Number.types:
80
+ case (ndarray(), None, None, None):
81
+ low, high = nanmin(frames), nanmax(frames)
82
+ case (ndarray(), None, None, x) if type(x) in Number.types:
81
83
  low, high = nanquantile(frames, (1-saturate, saturate))
82
- case (None, None, x) if type(x) in Array.types:
84
+ case (ndarray(), None, None, x) if type(x) in Array.types:
83
85
  low, high = nanquantile(frames, (1-saturate[0], saturate[1]))
84
86
  match norm.lower():
85
87
  case "lognorm"|"log":
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes