MCPcopy
hub / github.com/tum-pbs/PhiFlow / __stack__

Method __stack__

phi/geom/_geom.py:482–487  ·  view source on GitHub ↗
(values: tuple, dim: Shape, **kwargs)

Source from the content-addressed store, hash-verified

480
481 @staticmethod
482 def __stack__(values: tuple, dim: Shape, **kwargs) -> 'Geometry':
483 if all(type(v) == type(values[0]) for v in values):
484 return NotImplemented # let attributes be stacked
485 else:
486 from ._geom_ops import GeometryStack
487 return GeometryStack(math.layout(values, dim))
488
489 def __flatten__(self, flat_dim: Shape, flatten_batch: bool, **kwargs) -> 'Geometry':
490 dims = self.shape.without('vector')

Callers

nothing calls this directly

Calls 1

GeometryStackClass · 0.85

Tested by

no test coverage detected