simulariumio/data_objects/dimension_data.py
def add(self, added_dimensions: DimensionData, axis: int = 1) -> DimensionData:
        """
        Add the given dimensions with this object's and return a copy
        """
        if axis == 1:
            if (
                self.total_steps > 0
                and added_dimensions.total_steps != self.total_steps
            ):
                raise DataError(
                    "Total steps must be equal when adding dimensions on agent axis: "
                    f"{added_dimensions.total_steps} != {self.total_steps}"
                )
            result_total_steps = added_dimensions.total_steps
        else:
            result_total_steps = self.total_steps + added_dimensions.total_steps
        return DimensionData(
            total_steps=result_total_steps,
            max_agents=self.max_agents + added_dimensions.max_agents,
            max_subpoints=self.max_subpoints + added_dimensions.max_subpoints,
        )

        Add the given dimensions with this object's and return a copy
        
Add the given dimensions with this object's and return a copy
Add the given dimensions with this object ' s and return a copy
def add(self, added_dimensions: DimensionData, axis: int = 1) -> DimensionData:
        if axis == 1:
            if (
                self.total_steps > 0
                and added_dimensions.total_steps != self.total_steps
            ):
                raise DataError(
                    "Total steps must be equal when adding dimensions on agent axis: "
                    f"{added_dimensions.total_steps} != {self.total_steps}"
                )
            result_total_steps = added_dimensions.total_steps
        else:
            result_total_steps = self.total_steps + added_dimensions.total_steps
        return DimensionData(
            total_steps=result_total_steps,
            max_agents=self.max_agents + added_dimensions.max_agents,
            max_subpoints=self.max_subpoints + added_dimensions.max_subpoints,
        )
def add ( self , added_dimensions : DimensionData , axis : int = 1 ) -> DimensionData : if axis == 1 : if ( self . total_steps > 0 and added_dimensions . total_steps != self . total_steps ) : raise DataError ( "Total steps must be equal when adding dimensions on agent axis: " f"{added_dimensions.total_steps} != {self.total_steps}" ) result_total_steps = added_dimensions . total_steps else : result_total_steps = self . total_steps + added_dimensions . total_steps return DimensionData ( total_steps = result_total_steps , max_agents = self . max_agents + added_dimensions . max_agents , max_subpoints = self . max_subpoints + added_dimensions . max_subpoints , )
Add the given dimensions with this object's and return a copy
Add the given dimensions with this object ' s and return a copy
"""
        Add the given dimensions with this object's and return a copy
        """
self
added_dimensions
DimensionData
axis
int