# Path: discretize/utils/code_utils.py
# def is_scalar(f):
#     """Determine if the input argument is a scalar.
# 
#     The function **is_scalar** returns *True* if the input is an integer,
#     float or complex number. The function returns *False* otherwise.
# 
#     Parameters
#     ----------
#     f :
#         Any input quantity
# 
#     Returns
#     -------
#     bool :
# 
#         - *True* if the input argument is an integer, float or complex number
#         - *False* otherwise
# 
# 
#     """
# 
#     if isinstance(f, SCALARTYPES):
#         return True
#     elif isinstance(f, np.ndarray) and f.size == 1 and isinstance(f[0], SCALARTYPES):
#         return True
#     return False
# 
# def deprecate_function(new_function, old_name, removal_version=None, future_warn=False):
#     if future_warn:
#         Warning = FutureWarning
#     else:
#         Warning = DeprecationWarning
#     new_name = new_function.__name__
#     if removal_version is not None:
#         tag = f" It will be removed in version {removal_version} of discretize."
#     else:
#         tag = " It will be removed in a future version of discretize."
# 
#     def dep_function(*args, **kwargs):
#         warnings.warn(
#             f"{old_name} has been deprecated, please use {new_name}." + tag,
#             Warning,
#         )
#         return new_function(*args, **kwargs)
# 
#     doc = f"""
#     `{old_name}` has been deprecated. See `{new_name}` for documentation
# 
#     See Also
#     --------
#     {new_name}
#     """
#     dep_function.__doc__ = doc
#     return dep_function


import numpy as np
import scipy.sparse as sp
import warnings
from discretize.utils.code_utils import is_scalar, deprecate_function
        self._val = val

    def __getitem__(self, key):
        if isinstance(key, slice):
            return _inftup(self._val)
        return self._val

    def __len__(self):
        return 0

    def __repr__(self):
        return f"({self._val}, {self._val}, ...)"


################################################
#             DEPRECATED FUNCTIONS
################################################

sdInv = deprecate_function(sdinv, "sdInv", removal_version="1.0.0", future_warn=False)

getSubArray = deprecate_function(get_subarray, "getSubArray", removal_version="1.0.0", future_warn=False)

inv3X3BlockDiagonal = deprecate_function(
    inverse_3x3_block_diagonal, "inv3X3BlockDiagonal", removal_version="1.0.0", future_warn=False
)

inv2X2BlockDiagonal = deprecate_function(
    inverse_2x2_block_diagonal, "inv2X2BlockDiagonal", removal_version="1.0.0", future_warn=False
)


# Path: discretize/utils/code_utils.py
# def is_scalar(f):
#     """Determine if the input argument is a scalar.
# 
#     The function **is_scalar** returns *True* if the input is an integer,
#     float or complex number. The function returns *False* otherwise.
# 
#     Parameters
#     ----------
#     f :
#         Any input quantity
# 
#     Returns
#     -------
#     bool :
# 
#         - *True* if the input argument is an integer, float or complex number
#         - *False* otherwise
# 
# 
#     """
# 
#     if isinstance(f, SCALARTYPES):
#         return True
#     elif isinstance(f, np.ndarray) and f.size == 1 and isinstance(f[0], SCALARTYPES):
#         return True
#     return False
# 
# def deprecate_function(new_function, old_name, removal_version=None, future_warn=False):
#     if future_warn:
#         Warning = FutureWarning
#     else:
#         Warning = DeprecationWarning
#     new_name = new_function.__name__
#     if removal_version is not None:
#         tag = f" It will be removed in version {removal_version} of discretize."
#     else:
#         tag = " It will be removed in a future version of discretize."
# 
#     def dep_function(*args, **kwargs):
#         warnings.warn(
#             f"{old_name} has been deprecated, please use {new_name}." + tag,
#             Warning,
#         )
#         return new_function(*args, **kwargs)
# 
#     doc = f"""
#     `{old_name}` has been deprecated. See `{new_name}` for documentation
# 
#     See Also
#     --------
#     {new_name}
#     """
#     dep_function.__doc__ = doc
#     return dep_function


# Path: discretize/utils/matrix_utils.py
import numpy as np
import scipy.sparse as sp
import warnings
from discretize.utils.code_utils import is_scalar, deprecate_function

        self._val = val

    def __getitem__(self, key):
        if isinstance(key, slice):
            return _inftup(self._val)
        return self._val

    def __len__(self):
        return 0

    def __repr__(self):
        return f"({self._val}, {self._val}, ...)"


################################################
#             DEPRECATED FUNCTIONS
################################################

sdInv = deprecate_function(sdinv, "sdInv", removal_version="1.0.0", future_warn=False)

getSubArray = deprecate_function(get_subarray, "getSubArray", removal_version="1.0.0", future_warn=False)

inv3X3BlockDiagonal = deprecate_function(
    inverse_3x3_block_diagonal, "inv3X3BlockDiagonal", removal_version="1.0.0", future_warn=False
)

inv2X2BlockDiagonal = deprecate_function(
    inverse_2x2_block_diagonal, "inv2X2BlockDiagonal", removal_version="1.0.0", future_warn=False
)


makePropertyTensor = deprecate_function(