Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
332cf68
WIP
flying-sheep Jun 26, 2023
37cebc1
wip
flying-sheep Jun 26, 2023
2b74d8f
WIP Find algos
flying-sheep Jun 26, 2023
11b06a4
fix types
flying-sheep Jun 27, 2023
48adc4e
move out backend stuff
flying-sheep Jun 27, 2023
57bc64c
extract gauss
flying-sheep Jun 27, 2023
dea6309
rename
flying-sheep Jun 27, 2023
55063c6
Merge branch 'master' into neighbors-backend
flying-sheep Jun 27, 2023
75c6670
simplify
flying-sheep Jun 27, 2023
1fda5c7
defer
flying-sheep Jun 27, 2023
e46936c
types
flying-sheep Jun 27, 2023
c1894e7
revert simplifying knn
flying-sheep Jun 29, 2023
75c04a8
RapidsKNNTransformer
flying-sheep Jun 29, 2023
215b6b9
commit to API
flying-sheep Jun 29, 2023
de321d2
UMAPKNNTransformer
flying-sheep Jun 29, 2023
6c6172d
Merge branch 'master' into neighbors-backend
flying-sheep Jun 30, 2023
560e4d6
Backend selection
flying-sheep Jun 30, 2023
735a64f
Remove slow umap code
flying-sheep Jun 30, 2023
9a5d27c
Fix transformers
flying-sheep Jun 30, 2023
d29dc5f
Extract precomputed from umap
flying-sheep Jul 6, 2023
72664a7
simplify
flying-sheep Jul 6, 2023
9304fe3
Allow specifying just backend
flying-sheep Jul 6, 2023
fa42d89
remove umap transformer
flying-sheep Jul 6, 2023
b0a9318
Adapt to PyNNDescentTransformer
flying-sheep Jul 6, 2023
0880a4b
[pre-commit.ci] pre-commit autoupdate (#2544)
pre-commit-ci[bot] Jul 4, 2023
561a726
reorg imports
flying-sheep Jul 6, 2023
f610c13
test fix
flying-sheep Jul 6, 2023
b31a003
less warnings
flying-sheep Jul 6, 2023
e280b2d
fix test
flying-sheep Jul 6, 2023
cb83f8d
restore special handling of umap
flying-sheep Jul 6, 2023
9521925
reorder
flying-sheep Jul 6, 2023
671bbc1
simplify
flying-sheep Jul 6, 2023
4aa32ed
Remove tests
flying-sheep Jul 6, 2023
16913c4
undo added dep
flying-sheep Jul 6, 2023
a43b182
Move connectivity code
flying-sheep Jul 6, 2023
1edc197
Merge branch 'master' into neighbors-backend
flying-sheep Jul 6, 2023
be8940c
tests
flying-sheep Jul 6, 2023
dc656d4
Get tests closer
flying-sheep Jul 7, 2023
5280f84
Merge branch 'master' into neighbors-backend
flying-sheep Jul 31, 2023
969efa5
remove backends for now
flying-sheep Jul 31, 2023
7a09e1d
simplify
flying-sheep Jul 31, 2023
3d07078
simpler
flying-sheep Jul 31, 2023
29c168e
docs
flying-sheep Jul 31, 2023
dd1a013
fix tolerances
flying-sheep Jul 31, 2023
04fd078
Fix tests
flying-sheep Jul 31, 2023
e70e712
fix for 3.8
flying-sheep Jul 31, 2023
bfa978e
real fix
flying-sheep Jul 31, 2023
02d963b
add cuml to intersphinx
flying-sheep Aug 1, 2023
2384bfa
fix RAPIDS todos
flying-sheep Aug 1, 2023
d4d0e7e
add pynndescent to intersphinx
flying-sheep Aug 1, 2023
fcbbd79
fix link
flying-sheep Aug 1, 2023
73915b4
API makes sense
flying-sheep Aug 1, 2023
9886424
right kind of warning
flying-sheep Aug 1, 2023
df9564f
fix tests
flying-sheep Aug 1, 2023
704bc82
simple changes
flying-sheep Aug 3, 2023
e26b96b
add brute force test
flying-sheep Aug 3, 2023
09934d0
switch all to KNeighborsTransformer
flying-sheep Aug 3, 2023
1fa211b
ArrayLike
flying-sheep Aug 3, 2023
3301f0b
Merge branch 'master' into neighbors-backend
flying-sheep Aug 3, 2023
735803d
more docs
flying-sheep Aug 3, 2023
512a4c5
some typing
flying-sheep Aug 3, 2023
07b5d94
fix shortcut
flying-sheep Aug 3, 2023
f96b10c
prettier
flying-sheep Aug 3, 2023
26a36fa
fix spurious import
flying-sheep Aug 4, 2023
103bf53
cluster order changed
flying-sheep Aug 4, 2023
e75ebb2
fix 3.8 and minimal tests
flying-sheep Aug 4, 2023
e76bc40
Merge branch 'master' into neighbors-backend
flying-sheep Aug 17, 2023
74291a8
Fix links
flying-sheep Aug 17, 2023
4c66a72
Merge branch 'master' into neighbors-backend
flying-sheep Aug 29, 2023
283bc52
fixup merge
flying-sheep Aug 29, 2023
592dc5b
Switch to instance
flying-sheep Aug 29, 2023
54a3335
add example
flying-sheep Aug 29, 2023
1be1515
Fix docs
flying-sheep Aug 29, 2023
a2a6d23
changelog
flying-sheep Aug 29, 2023
e643925
fix docs
flying-sheep Aug 31, 2023
0395f28
fix for 3.8
flying-sheep Aug 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,18 @@
intersphinx_mapping = dict(
anndata=('https://anndata.readthedocs.io/en/stable/', None),
bbknn=('https://bbknn.readthedocs.io/en/latest/', None),
cuml=('https://docs.rapids.ai/api/cuml/stable/', None),
cycler=('https://matplotlib.org/cycler/', None),
h5py=('https://docs.h5py.org/en/stable/', None),
ipython=('https://ipython.readthedocs.io/en/stable/', None),
igraph=('https://python.igraph.org/en/stable/api/', None),
leidenalg=('https://leidenalg.readthedocs.io/en/latest/', None),
louvain=('https://louvain-igraph.readthedocs.io/en/latest/', None),
matplotlib=('https://matplotlib.org/stable/', None),
networkx=('https://networkx.org/documentation/stable/', None),
numpy=('https://numpy.org/doc/stable/', None),
pandas=('https://pandas.pydata.org/pandas-docs/stable/', None),
pynndescent=('https://pynndescent.readthedocs.io/en/latest/', None),
pytest=('https://docs.pytest.org/en/latest/', None),
python=('https://docs.python.org/3', None),
scipy=('https://docs.scipy.org/doc/scipy/', None),
Expand Down Expand Up @@ -187,12 +190,14 @@ def setup(app: Sphinx):
nitpick_ignore = [
# Will probably be documented
('py:class', 'scanpy._settings.Verbosity'),
('py:class', 'scanpy.neighbors.OnFlySymMatrix'),
# Currently undocumented: https://github.com/mwaskom/seaborn/issues/1810
('py:class', 'seaborn.ClusterGrid'),
# Won’t be documented
('py:class', 'scanpy.plotting._utils._AxesSubplot'),
('py:class', 'scanpy._utils.Empty'),
('py:class', 'numpy.random.mtrand.RandomState'),
('py:class', 'scanpy.neighbors._types.KnnTransformerLike'),
# Will work once scipy 1.8 is released
('py:class', 'scipy.sparse.base.spmatrix'),
('py:class', 'scipy.sparse.csr.csr_matrix'),
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes/1.10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

* {func}`scanpy.pp.pca` and {func}`scanpy.pp.regress_out` now accept a layer argument {pr}`2588` {smaller}`S Dicks`
* {func}`scanpy.pp.subsample` with `copy=True` can now be called in backed mode {pr}`2624` {smaller}`E Roellin`
* {func}`scanpy.pp.neighbors` now has a `transformer` argument allowing for more flexibility {pr}`2536` {smaller}`P Angerer`

```{rubric} Docs
```
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ scanpy = "scanpy.cli:console_main"
test-min = [
"pytest>=4.4",
"pytest-nunit",
"pytest-mock",
"profimp",
]
test = [
Expand Down
10 changes: 9 additions & 1 deletion scanpy/_compat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
from packaging import version

try:
from functools import cache
except ImportError: # Python < 3.9
from functools import lru_cache

cache = lru_cache(maxsize=None)

try:
from dask.array import Array as DaskArray
except ImportError:
Expand All @@ -8,7 +15,7 @@ class DaskArray:
pass


__all__ = ['DaskArray', 'fullname', 'pkg_metadata', 'pkg_version']
__all__ = ['cache', 'DaskArray', 'fullname', 'pkg_metadata', 'pkg_version']


def fullname(typ: type) -> str:
Expand All @@ -25,6 +32,7 @@ def pkg_metadata(package):
return m(package)


@cache
def pkg_version(package):
from importlib.metadata import version as v

Expand Down
Loading