simulariumio/data_objects/agent_data.py
def from_dimensions(
        cls, dimensions: DimensionData, default_viz_type: float = VIZ_TYPE.DEFAULT
    ):
        """
        Create AgentData with empty numpy arrays of the required dimensions
        """
        return cls(
            times=np.zeros(dimensions.total_steps),
            n_agents=np.zeros(dimensions.total_steps),
            viz_types=default_viz_type
            * np.ones((dimensions.total_steps, dimensions.max_agents)),
            unique_ids=np.zeros((dimensions.total_steps, dimensions.max_agents)),
            types=[[] for t in range(dimensions.total_steps)],
            positions=np.zeros((dimensions.total_steps, dimensions.max_agents, 3)),
            radii=np.ones((dimensions.total_steps, dimensions.max_agents)),
            rotations=np.zeros((dimensions.total_steps, dimensions.max_agents, 3)),
            n_subpoints=np.zeros((dimensions.total_steps, dimensions.max_agents)),
            subpoints=np.zeros(
                (
                    dimensions.total_steps,
                    dimensions.max_agents,
                    dimensions.max_subpoints,
                    3,
                )
            ),
        )

        Create AgentData with empty numpy arrays of the required dimensions
        
Create AgentData with empty numpy arrays of the required dimensions
Create AgentData with empty numpy arrays of the required dimensions
def from_dimensions(
        cls, dimensions: DimensionData, default_viz_type: float = VIZ_TYPE.DEFAULT
    ):
        return cls(
            times=np.zeros(dimensions.total_steps),
            n_agents=np.zeros(dimensions.total_steps),
            viz_types=default_viz_type
            * np.ones((dimensions.total_steps, dimensions.max_agents)),
            unique_ids=np.zeros((dimensions.total_steps, dimensions.max_agents)),
            types=[[] for t in range(dimensions.total_steps)],
            positions=np.zeros((dimensions.total_steps, dimensions.max_agents, 3)),
            radii=np.ones((dimensions.total_steps, dimensions.max_agents)),
            rotations=np.zeros((dimensions.total_steps, dimensions.max_agents, 3)),
            n_subpoints=np.zeros((dimensions.total_steps, dimensions.max_agents)),
            subpoints=np.zeros(
                (
                    dimensions.total_steps,
                    dimensions.max_agents,
                    dimensions.max_subpoints,
                    3,
                )
            ),
        )
def from_dimensions ( cls , dimensions : DimensionData , default_viz_type : float = VIZ_TYPE . DEFAULT ) : return cls ( times = np . zeros ( dimensions . total_steps ) , n_agents = np . zeros ( dimensions . total_steps ) , viz_types = default_viz_type * np . ones ( ( dimensions . total_steps , dimensions . max_agents ) ) , unique_ids = np . zeros ( ( dimensions . total_steps , dimensions . max_agents ) ) , types = [ [ ] for t in range ( dimensions . total_steps ) ] , positions = np . zeros ( ( dimensions . total_steps , dimensions . max_agents , 3 ) ) , radii = np . ones ( ( dimensions . total_steps , dimensions . max_agents ) ) , rotations = np . zeros ( ( dimensions . total_steps , dimensions . max_agents , 3 ) ) , n_subpoints = np . zeros ( ( dimensions . total_steps , dimensions . max_agents ) ) , subpoints = np . zeros ( ( dimensions . total_steps , dimensions . max_agents , dimensions . max_subpoints , 3 , ) ) , )
Create AgentData with empty numpy arrays of the required dimensions
Create AgentData with empty numpy arrays of the required dimensions
"""
        Create AgentData with empty numpy arrays of the required dimensions
        """
cls
dimensions
DimensionData
default_viz_type
float