INNER CODE UNIT · Python

default

linnabrown/run_dbcan · dbcan/cli/cgc_process_json.py:203

    def default(self, obj):
        """
        Provides custom serialization for certain data types.

        Parameters
        ----------
            obj: The object to serialize.

        Returns
        -------
            The serialized object, converting `numpy.int64` to string. For other types, it relies on the superclass implementation.

        Raises
        ------
            TypeError: If the object is not a recognized type and cannot be serialized by the superclass.
        """
        if isinstance(obj, np.int64):
            return str(obj)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…