Skip to content

Commit

Permalink
numpydoc style docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Nov 25, 2023
1 parent dc1dbd3 commit a0bcfff
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions pylops/utils/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ def check_module_enabled(
envrionment_val: Optional[int] = 1,
) -> bool:
"""
Checks whether a specific module can be imported in the current Python environment.
Args:
module (str): The name of the module to check import state for.
envrionment_str (Optional[str]): An optional environment variable name to check for. If provided,
the function will return True only if the environment variable is set to the specified value.
Defaults to None.
envrionment_val (Optional[str]): The value to compare the environment variable against. Defaults to "1".
Returns:
bool: True if the module is available, False otherwise.
Check whether a specific module can be imported in the current Python environment.
Parameters
----------
module : str
The name of the module to check import state for.
environment_str : str, optional
An optional environment variable name to check for. If provided, the function will return True
only if the environment variable is set to the specified value. Defaults to None.
environment_val : str, optional
The value to compare the environment variable against. Defaults to "1".
Returns
-------
bool
True if the module is available, False otherwise.
"""
# try to import the module
try:
Expand Down

0 comments on commit a0bcfff

Please sign in to comment.