orbithunter.OrbitKS.resize¶
-
OrbitKS.
resize
(*new_discretization, **kwargs)¶ Rediscretize the current state typically via zero padding or interpolation.
- Parameters
- new_discretizationint or tuple of ints
New discretization size
- kwargsdict
keyword arguments for dimension_based_discretization.
- Returns
- placeholder_orbit :
Orbit with new discretization; the new shape always refers to the shape in the self.bases_labels()[0] basis. Always returned in originating basis.
Notes
Description of how different number/types of args are handled: If passed as single int x, then new_discretization=(x,): len==1 but type(new_shape)==int If passed as tuple with length one (a,), then new_discretization=((a,),) If passed as tuple with length n, then new_discretization=((x,y,…,z),) If len >= 2 then could be multiple ints (x,y) or multiple tuples ((a,b), (c,d)) In other words, they are all tuples, but type checking and unpacking has to be done carefully due to contents. All tuples of the form ((x,y,…,z),) are assumed to be redundant representations of (x,y,…,z)