Source code for Muscat.Types
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
#
import sys
from typing import Union
""" Developer Documentation:
A change of the type in this files must be coherent with the types in :
CythonTypes.pxd and EigenTypes.h
"""
import numpy as np
if sys.platform == "win32" and np.__version__.startswith("1."):
MuscatIndex = np.int32
else:
MuscatIndex = np.int64
"""Type for the ints in Muscat.
originalIDs, connectivity matrix and indices for example.
"""
MuscatFloat = np.float64
"""Type for the floats in Muscat.
fields values and point positions for example.
"""
from numpy.typing import ArrayLike, NDArray
ScalarIntLike = Union[int, MuscatIndex]
"""MetaType for typing int like arguments
"""
[docs]
def CheckIntegrity(GUI: bool = False) -> str:
print("Muscat Types are:")
print(f"- {MuscatFloat=}")
print(f"- {MuscatIndex=}")
print(f"- {ScalarIntLike=}")
print(f"- {NDArray=}")
print(f"- {ArrayLike=}")
return "ok"