def evaluate_transformation_matrix(self, dynamic_values, constant_values):
        """Returns the numerical transformation matrices for each time step.

        Parameters
        ----------
        dynamic_values : array_like, shape(m,) or shape(n, m)
            The m state values for each n time step.
        constant_values : array_like, shape(p,)
            The p constant parameter values of the system.

        Returns
        -------
        transform_matrix : numpy.array, shape(n, 16)
            A 4 x 4 transformation matrix for each time step.

        """
        #If states is instance of numpy array, well and good.
        #else convert it to one:

        states = np.squeeze(np.array(dynamic_values))
        if not isinstance(constant_values, Iterator):
            constant_values = list(constant_values)
        if len(states.shape) > 1:
            n = states.shape[0]
            args = []
            for a in np.split(states, states.shape[1], 1):
                args.append(np.squeeze(a))
            for a in constant_values:
                args.append(np.repeat(a, n))
        else:
            n = 1
            args = np.hstack((states, constant_values))

        new = np.zeros((n, 16))
        for i, t in enumerate(self._numeric_transform):
            if callable(t):
                try:
                    new[:, i] = t(*args)
                except TypeError:
                    # dynamic values are not necessary so pass only constant
                    # values into transform function
                    new[:, i] = np.repeat(t(*constant_values), n)
            else:
                new[:, i] = np.repeat(t, n)
        self._visualization_matrix = new.tolist()
        return self._visualization_matrix
dataset/ETHPy150Open pydy/pydy/pydy/viz/visualization_frame.py/VisualizationFrame.evaluate_transformation_matrix/original