You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stack level should be set so the right line is shown
Message should be more like:
FutureWarning: In the future, the default backend for leiden will be igraph instead of leidenalg. To achieve the future defaults please pass: flavor="igraph" and n_iterations=2. directed must also be False to work with igraph's implementation.
Note that results will be slightly different with the changed backend.
We should only warn once, instead of every time leiden is called. Here's a util we defined in anndata for this (I think stolen from pandas?)
defwarn_once(msg: str, category: type[Warning], stacklevel: int=1):
warnings.warn(msg, category, stacklevel=stacklevel)
# Prevent from showing up every time an awkward array is used# You'd think `'once'` works, but it doesn't at the repl and in notebookswarnings.filterwarnings("ignore", category=category, message=re.escape(msg))
See: #2865
The text was updated successfully, but these errors were encountered: