cubnm.utils
Utility functions
Get the number of available GPUs |
|
This function checks if the current environment is a Jupyter notebook. |
|
|
Calculates Euclidean distance of two FC arrays |
|
Get Balloon-Windkessel model parameters |
- cubnm.utils.is_jupyter()
This function checks if the current environment is a Jupyter notebook.
- Returns:
bool: True if the current environment is a Jupyter notebook, False otherwise.
- cubnm.utils.fc_norm_euclidean(x, y)
Calculates Euclidean distance of two FC arrays divided by their maximum possible distance, equal to the distance of np.ones(n_pairs) and -np.ones(n_pairs) or 2 * np.sqrt(n_pairs)
Parameters
- x, y:
np.ndarray FC arrays. Shape: (n_pairs,)
Returns
floatNormalized Euclidean distance
- x, y: