quantnn/utils.py
def deserialize_dataset(data):
    """
    Read xarray dataset from byte stream containing the
    dataset in NetCDF format.

    Args:
        data: The bytes object containing the binary data of the
            NetCDf file.

    Returns:
        The deserialized xarray dataset.
    """

    _, filename = mkstemp()
    try:
        with open(filename, "wb") as file:
            buffer = file.write(data)
        dataset = xr.load_dataset(filename, engine="netcdf4")
    finally:
        Path(filename).unlink()
    return dataset

    Read xarray dataset from byte stream containing the
    dataset in NetCDF format.

    Args:
        data: The bytes object containing the binary data of the
            NetCDf file.

    Returns:
        The deserialized xarray dataset.
    
Read xarray dataset from byte stream containing the
dataset in NetCDF format.
Read xarray dataset from byte stream containing the dataset in NetCDF format .
def deserialize_dataset(data):
    _, filename = mkstemp()
    try:
        with open(filename, "wb") as file:
            buffer = file.write(data)
        dataset = xr.load_dataset(filename, engine="netcdf4")
    finally:
        Path(filename).unlink()
    return dataset
def deserialize_dataset ( data ) : _ , filename = mkstemp ( ) try : with open ( filename , "wb" ) as file : buffer = file . write ( data ) dataset = xr . load_dataset ( filename , engine = "netcdf4" ) finally : Path ( filename ) . unlink ( ) return dataset
Read xarray dataset from byte stream containing the
dataset in NetCDF format.
Read xarray dataset from byte stream containing the dataset in NetCDF format .
"""
    Read xarray dataset from byte stream containing the
    dataset in NetCDF format.

    Args:
        data: The bytes object containing the binary data of the
            NetCDf file.

    Returns:
        The deserialized xarray dataset.
    """
The deserialized xarray dataset.
The deserialized xarray dataset .
data
The bytes object containing the binary data of the
NetCDf file.
The bytes object containing the binary data of the NetCDf file .