oasislmf.pytools.common.data ============================ .. py:module:: oasislmf.pytools.common.data Attributes ---------- .. autoapisummary:: oasislmf.pytools.common.data.oasis_int oasislmf.pytools.common.data.nb_oasis_int oasislmf.pytools.common.data.oasis_int_size oasislmf.pytools.common.data.oasis_float oasislmf.pytools.common.data.nb_oasis_float oasislmf.pytools.common.data.oasis_float_size oasislmf.pytools.common.data.areaperil_int oasislmf.pytools.common.data.nb_areaperil_int oasislmf.pytools.common.data.areaperil_int_size oasislmf.pytools.common.data.null_index oasislmf.pytools.common.data.summary_xref_dtype oasislmf.pytools.common.data.fm_programme_dtype oasislmf.pytools.common.data.fm_policytc_dtype oasislmf.pytools.common.data.fm_profile_dtype oasislmf.pytools.common.data.fm_profile_step_dtype oasislmf.pytools.common.data.fm_profile_csv_col_map oasislmf.pytools.common.data.fm_xref_dtype oasislmf.pytools.common.data.fm_xref_csv_col_map oasislmf.pytools.common.data.coverages_dtype oasislmf.pytools.common.data.items_dtype oasislmf.pytools.common.data.float_equal_precision Functions --------- .. autoapisummary:: oasislmf.pytools.common.data.load_as_ndarray oasislmf.pytools.common.data.load_as_array oasislmf.pytools.common.data.almost_equal Module Contents --------------- .. py:data:: oasis_int .. py:data:: nb_oasis_int .. py:data:: oasis_int_size .. py:data:: oasis_float .. py:data:: nb_oasis_float .. py:data:: oasis_float_size .. py:data:: areaperil_int .. py:data:: nb_areaperil_int .. py:data:: areaperil_int_size .. py:data:: null_index .. py:data:: summary_xref_dtype .. py:data:: fm_programme_dtype .. py:data:: fm_policytc_dtype .. py:data:: fm_profile_dtype .. py:data:: fm_profile_step_dtype .. py:data:: fm_profile_csv_col_map .. py:data:: fm_xref_dtype .. py:data:: fm_xref_csv_col_map .. py:data:: coverages_dtype .. py:data:: items_dtype .. py:function:: load_as_ndarray(dir_path, name, _dtype, must_exist=True, col_map=None) load a file as a numpy ndarray useful for multi-columns files Args: dir_path: path to the directory where the binary or csv file is stored name: name of the file _dtype: np.dtype must_exist: raise FileNotFoundError if no file is present col_map: name re-mapping to change name of csv columns Returns: numpy ndarray .. py:function:: load_as_array(dir_path, name, _dtype, must_exist=True) load file as a single numpy array, useful for files with a binary version with only one type of value where their index correspond to an id. For example coverage.bin only contains tiv value for each coverage id coverage_id n correspond to index n-1 Args: dir_path: path to the directory where the binary or csv file is stored name: name of the file _dtype: numpy dtype of the required array must_exist: raise FileNotFoundError if no file is present Returns: numpy array of dtype type .. py:data:: float_equal_precision .. py:function:: almost_equal(a, b)