Beispiel #1
0
    def register_array(self, name, shape, dtype, **kwargs):
        """
        Register an array with this Solver object.

        Arguments
        ----------
            name : string
                name of the array.
            shape : integer/string or tuple of integers/strings
                Shape of the array.
            dtype : data-type
                The data-type for the array.

        Returns
        -------
            A dictionary describing this array.
        """

        # Substitute any string types when calling the parent
        return super(RIMESolver, self).register_array(
            name, shape, mbu.dtype_from_str(dtype, self.type_dict()), **kwargs)
Beispiel #2
0
    def register_array(self, name, shape, dtype, **kwargs):
        """
        Register an array with this Solver object.

        Arguments
        ----------
            name : string
                name of the array.
            shape : integer/string or tuple of integers/strings
                Shape of the array.
            dtype : data-type
                The data-type for the array.

        Returns
        -------
            A dictionary describing this array.
        """

        # Substitute any string types when calling the parent
        return super(RIMESolver, self).register_array(name, shape,
            mbu.dtype_from_str(dtype, self.type_dict()),
            **kwargs)
Beispiel #3
0
    def register_property(self, name, dtype, default, **kwargs):
        """
        Registers a property with this Solver object

        Arguments
        ----------
            name : string
                The name of the property.
            dtype : data-type
                The data-type of this property
            default :
                Default value for the property.

        Returns
        -------
            A dictionary describing this property.

        """

        # Substitute any string types when calling the parent
        return super(RIMESolver, self).register_property(
            name, mbu.dtype_from_str(dtype, self.type_dict()), default,
            **kwargs)
Beispiel #4
0
    def register_property(self, name, dtype, default, **kwargs):
        """
        Registers a property with this Solver object

        Arguments
        ----------
            name : string
                The name of the property.
            dtype : data-type
                The data-type of this property
            default :
                Default value for the property.

        Returns
        -------
            A dictionary describing this property.

        """

        # Substitute any string types when calling the parent
        return super(RIMESolver, self).register_property(name,
            mbu.dtype_from_str(dtype, self.type_dict()),
            default, **kwargs)
Beispiel #5
0
 def _massage_dtype_in_dict(D):
     new_dict = D.copy()
     new_dict['dtype'] = mbu.dtype_from_str(D['dtype'], T)
     return new_dict