GraphAtoms 1.1.3__tar.gz → 1.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {graphatoms-1.1.3 → graphatoms-1.1.5}/PKG-INFO +44 -8
  2. {graphatoms-1.1.3 → graphatoms-1.1.5}/README.md +38 -6
  3. {graphatoms-1.1.3 → graphatoms-1.1.5}/pyproject.toml +20 -5
  4. graphatoms-1.1.5/src/graphatoms/arrayapi/__init__.py +11 -0
  5. graphatoms-1.1.5/src/graphatoms/arrayapi/_array_api_compat.py +15 -0
  6. graphatoms-1.1.5/src/graphatoms/arrayapi/_array_api_typing.py +10005 -0
  7. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/dataclasses/_pydanticMixin.py +2 -2
  8. graphatoms-1.1.5/src/graphatoms/dataclasses/graph.py +60 -0
  9. graphatoms-1.1.5/src/graphatoms/geometry/mic.py +213 -0
  10. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/reaction/__init__.py +2 -2
  11. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.1.5/src/graphatoms/reaction/event}/_event.py +2 -3
  12. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.1.5/src/graphatoms/reaction/event}/adsorption.py +3 -2
  13. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.1.5/src/graphatoms/reaction/event}/desorption.py +3 -2
  14. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.1.5/src/graphatoms/reaction/event}/reaction.py +3 -2
  15. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/_base.py +1 -2
  16. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/_simNVT.py +1 -1
  17. {graphatoms-1.1.3/src/graphatoms/reaction/_mdwarpper → graphatoms-1.1.5/src/graphatoms/reaction/mdwarpper}/__init__.py +2 -1
  18. {graphatoms-1.1.3/src/graphatoms/reaction/_network → graphatoms-1.1.5/src/graphatoms/reaction/network}/_base.py +1 -1
  19. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/system/__init__.py +8 -4
  20. {graphatoms-1.1.3/src/graphatoms/system/_sys → graphatoms-1.1.5/src/graphatoms/system}/_sysCluster.py +4 -7
  21. {graphatoms-1.1.3/src/graphatoms/system/_sys → graphatoms-1.1.5/src/graphatoms/system}/_sysGas.py +3 -3
  22. {graphatoms-1.1.3/src/graphatoms/system/_atoms → graphatoms-1.1.5/src/graphatoms/system/atoms}/_box.py +1 -2
  23. {graphatoms-1.1.3/src/graphatoms/system/_atoms → graphatoms-1.1.5/src/graphatoms/system/atoms}/_struct.py +1 -2
  24. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.1.5/src/graphatoms/system/database}/sqliteASE.py +1 -0
  25. {graphatoms-1.1.3/src/graphatoms/system/_graph → graphatoms-1.1.5/src/graphatoms/system/graph}/_bonds.py +35 -6
  26. {graphatoms-1.1.3/src/graphatoms/system/_graph → graphatoms-1.1.5/src/graphatoms/system/graph}/_gasMixin.py +1 -2
  27. {graphatoms-1.1.3/src/graphatoms/system/_graph → graphatoms-1.1.5/src/graphatoms/system/graph}/_sysGraph.py +58 -17
  28. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/system/helper.py +22 -14
  29. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/utils/rdutils.py +10 -9
  30. graphatoms-1.1.3/src/graphatoms/system/_sys/__init__.py +0 -4
  31. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/LICENSE +0 -0
  32. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/__init__.py +0 -0
  33. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/dataclasses/__init__.py +0 -0
  34. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/dataclasses/_numpydantic.py +0 -0
  35. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/dataclasses/_pydantic2pyarrow.py +0 -0
  36. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/dataclasses/_pydanticModel.py +0 -0
  37. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/geometry/__init__.py +0 -0
  38. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/geometry/_bond_list.py +0 -0
  39. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/geometry/_distance_pairs.py +0 -0
  40. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/geometry/_inner_outer.py +0 -0
  41. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/geometry/_neighbor_list.py +0 -0
  42. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/geometry/rotation.py +0 -0
  43. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/geometry/sample.py +0 -0
  44. {graphatoms-1.1.3/src/graphatoms/reaction/_abc → graphatoms-1.1.5/src/graphatoms/reaction/base}/__init__.py +0 -0
  45. {graphatoms-1.1.3/src/graphatoms/reaction/_abc → graphatoms-1.1.5/src/graphatoms/reaction/base}/move.py +0 -0
  46. {graphatoms-1.1.3/src/graphatoms/reaction/_abc → graphatoms-1.1.5/src/graphatoms/reaction/base}/rtgp.py +0 -0
  47. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.1.5/src/graphatoms/reaction/event}/__init__.py +0 -0
  48. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/__init__.py +0 -0
  49. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/_abc.py +0 -0
  50. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/_moveFB.py +0 -0
  51. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/_moveSP.py +0 -0
  52. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/_moveSwap.py +0 -0
  53. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/test_mmc.py +0 -0
  54. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/test_move.py +0 -0
  55. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.1.5/src/graphatoms/reaction/mcmove}/zzz.py +0 -0
  56. {graphatoms-1.1.3/src/graphatoms/reaction/_network → graphatoms-1.1.5/src/graphatoms/reaction/network}/__init__.py +0 -0
  57. {graphatoms-1.1.3/src/graphatoms/system/_atoms → graphatoms-1.1.5/src/graphatoms/system/atoms}/__init__.py +0 -0
  58. {graphatoms-1.1.3/src/graphatoms/system/_atoms → graphatoms-1.1.5/src/graphatoms/system/atoms}/_eng.py +0 -0
  59. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.1.5/src/graphatoms/system/database}/__init__.py +0 -0
  60. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.1.5/src/graphatoms/system/database}/base.py +0 -0
  61. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.1.5/src/graphatoms/system/database}/hdf5.py +0 -0
  62. {graphatoms-1.1.3/src/graphatoms/system/_graph → graphatoms-1.1.5/src/graphatoms/system/graph}/__init__.py +0 -0
  63. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/utils/__init__.py +0 -0
  64. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/utils/bytestool.py +0 -0
  65. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/utils/logger.py +0 -0
  66. {graphatoms-1.1.3 → graphatoms-1.1.5}/src/graphatoms/utils/parser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphatoms
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: The Chemical Core Class for Graph Theory Analysis.
5
5
  Keywords: chemistry,graph theory,reaction,event,KMC
6
6
  Author: LiuGaoyong
@@ -14,12 +14,16 @@ Requires-Dist: ase
14
14
  Requires-Dist: pymatgen>2023.6
15
15
  Requires-Dist: rdkit>=2025
16
16
  Requires-Dist: scikit-learn>=1.5
17
+ Requires-Dist: array-api-compat>=1.10
18
+ Requires-Dist: array-api-extra>=0.10
17
19
  Requires-Dist: pyarrow
18
20
  Requires-Dist: igraph>=0.11
19
21
  Requires-Dist: h5py>=3.16
20
22
  Requires-Dist: hydra-core
23
+ Requires-Dist: numpy>=2.0.0,<3
21
24
  Requires-Dist: numpydantic
22
- Requires-Dist: pydantic>=2.11
25
+ Requires-Dist: ovld
26
+ Requires-Dist: pydantic>=2.10
23
27
  Requires-Dist: python-snappy>=0.7.3
24
28
  Requires-Dist: tomli ; python_full_version < '3.11'
25
29
  Requires-Dist: tomli-w
@@ -36,44 +40,60 @@ Description-Content-Type: text/markdown
36
40
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Pypi version](https://img.shields.io/pypi/v/graphatoms)](https://pypi.org/project/graphatoms/) [![PyPI Downloads](https://static.pepy.tech/badge/graphatoms)](https://pepy.tech/projects/graphatoms)
37
41
 
38
42
 
39
- The Chemical Core Class for Graph Theory Analysis & Graph Neural Network.
43
+ The Chemical Core Class for Graph Theory Analysis.
40
44
 
41
45
  ## Overview
42
46
 
43
- The `graphatoms` is a Python library designed for chemical graph theory analysis and graph neural network applications. It provides core classes for representing chemical systems and reactions with graph-based data structures.
47
+ The `graphatoms` is a Python library designed for chemical graph theory analysis. It provides core classes for representing chemical systems and reactions with graph-based data structures.
44
48
 
45
49
  ## Features
46
50
 
47
51
  - **Graph-based Chemical System Representation**: Represent chemical systems, clusters, and gas molecules using graph theory
48
52
  - **Reaction Modeling**: Support for reaction classes, KMC (Kinetic Monte Carlo) events, and MC (Monte Carlo) moves
49
- - **Geometry Operations**: Bond lists, distance calculations, neighbor lists, rotations, and sampling
53
+ - **Geometry Operations**: Bond lists, distance calculations, neighbor lists, rotations, MIC (Minimum Image Convention), and sampling
50
54
  - **Data Storage**: Support for HDF5 and SQLite databases for efficient data persistence
51
55
  - **Dataclasses**: Pydantic-based data models for type-safe data handling
56
+ - **Array API Compatibility**: Support for array API standard for cross-framework compatibility
52
57
 
53
58
  ## Module Structure
54
59
 
55
60
  ```
56
61
  src/graphatoms/
62
+ ├── arrayapi/ # Array API compatibility layer
57
63
  ├── dataclasses/ # Pydantic-based data models
58
64
  ├── geometry/ # Geometric operations
59
65
  ├── reaction/ # Reaction classes and KMC events
60
- ├── system/ # Core system classes (System, Cluster, Gas)
66
+ │ ├── base/ # Abstract base classes
67
+ │ ├── event/ # KMC events (adsorption, desorption, reaction)
68
+ │ ├── mcmove/ # Monte Carlo moves
69
+ │ ├── mdwarpper/ # MD wrapper
70
+ │ └── network/ # Reaction network
71
+ ├── system/ # Core system classes
72
+ │ ├── atoms/ # Atomic structure handling
73
+ │ ├── database/ # Database storage backends
74
+ │ └── graph/ # Graph-based system representation
61
75
  └── utils/ # Utility functions
62
76
  ```
63
77
 
64
78
  ## Requirements
65
79
 
66
- - Python >= 3.10
80
+ - Python >= 3.12
67
81
  - ase
68
82
  - pymatgen > 2023.6
69
83
  - rdkit >= 2025
70
84
  - scikit-learn >= 1.5
85
+ - array-api-compat >= 1.10
86
+ - array-api-extra >= 0.10
71
87
  - pyarrow
72
88
  - igraph >= 0.11
73
89
  - h5py >= 3.16
74
90
  - hydra-core
91
+ - numpy >= 2.0.0
75
92
  - numpydantic
76
- - pydantic >= 2.11
93
+ - ovld
94
+ - pydantic >= 2.10
95
+ - python-snappy >= 0.7.3
96
+ - loguru
77
97
 
78
98
  ## Installation
79
99
 
@@ -81,6 +101,12 @@ src/graphatoms/
81
101
  pip install graphatoms
82
102
  ```
83
103
 
104
+ Or with conda:
105
+
106
+ ```bash
107
+ conda install -c conda-forge graphatoms
108
+ ```
109
+
84
110
  ## Development
85
111
 
86
112
  For development setup with pixi:
@@ -90,6 +116,16 @@ pixi install
90
116
  pixi run test
91
117
  ```
92
118
 
119
+ ## Running Tests
120
+
121
+ ```bash
122
+ # Run all tests
123
+ pytest src/tests/ -v
124
+
125
+ # Run benchmark tests
126
+ pytest src/tests-benchmark/ -v
127
+ ```
128
+
93
129
  ## License
94
130
 
95
131
  GPL-3.0-or-later
@@ -3,44 +3,60 @@
3
3
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Pypi version](https://img.shields.io/pypi/v/graphatoms)](https://pypi.org/project/graphatoms/) [![PyPI Downloads](https://static.pepy.tech/badge/graphatoms)](https://pepy.tech/projects/graphatoms)
4
4
 
5
5
 
6
- The Chemical Core Class for Graph Theory Analysis & Graph Neural Network.
6
+ The Chemical Core Class for Graph Theory Analysis.
7
7
 
8
8
  ## Overview
9
9
 
10
- The `graphatoms` is a Python library designed for chemical graph theory analysis and graph neural network applications. It provides core classes for representing chemical systems and reactions with graph-based data structures.
10
+ The `graphatoms` is a Python library designed for chemical graph theory analysis. It provides core classes for representing chemical systems and reactions with graph-based data structures.
11
11
 
12
12
  ## Features
13
13
 
14
14
  - **Graph-based Chemical System Representation**: Represent chemical systems, clusters, and gas molecules using graph theory
15
15
  - **Reaction Modeling**: Support for reaction classes, KMC (Kinetic Monte Carlo) events, and MC (Monte Carlo) moves
16
- - **Geometry Operations**: Bond lists, distance calculations, neighbor lists, rotations, and sampling
16
+ - **Geometry Operations**: Bond lists, distance calculations, neighbor lists, rotations, MIC (Minimum Image Convention), and sampling
17
17
  - **Data Storage**: Support for HDF5 and SQLite databases for efficient data persistence
18
18
  - **Dataclasses**: Pydantic-based data models for type-safe data handling
19
+ - **Array API Compatibility**: Support for array API standard for cross-framework compatibility
19
20
 
20
21
  ## Module Structure
21
22
 
22
23
  ```
23
24
  src/graphatoms/
25
+ ├── arrayapi/ # Array API compatibility layer
24
26
  ├── dataclasses/ # Pydantic-based data models
25
27
  ├── geometry/ # Geometric operations
26
28
  ├── reaction/ # Reaction classes and KMC events
27
- ├── system/ # Core system classes (System, Cluster, Gas)
29
+ │ ├── base/ # Abstract base classes
30
+ │ ├── event/ # KMC events (adsorption, desorption, reaction)
31
+ │ ├── mcmove/ # Monte Carlo moves
32
+ │ ├── mdwarpper/ # MD wrapper
33
+ │ └── network/ # Reaction network
34
+ ├── system/ # Core system classes
35
+ │ ├── atoms/ # Atomic structure handling
36
+ │ ├── database/ # Database storage backends
37
+ │ └── graph/ # Graph-based system representation
28
38
  └── utils/ # Utility functions
29
39
  ```
30
40
 
31
41
  ## Requirements
32
42
 
33
- - Python >= 3.10
43
+ - Python >= 3.12
34
44
  - ase
35
45
  - pymatgen > 2023.6
36
46
  - rdkit >= 2025
37
47
  - scikit-learn >= 1.5
48
+ - array-api-compat >= 1.10
49
+ - array-api-extra >= 0.10
38
50
  - pyarrow
39
51
  - igraph >= 0.11
40
52
  - h5py >= 3.16
41
53
  - hydra-core
54
+ - numpy >= 2.0.0
42
55
  - numpydantic
43
- - pydantic >= 2.11
56
+ - ovld
57
+ - pydantic >= 2.10
58
+ - python-snappy >= 0.7.3
59
+ - loguru
44
60
 
45
61
  ## Installation
46
62
 
@@ -48,6 +64,12 @@ src/graphatoms/
48
64
  pip install graphatoms
49
65
  ```
50
66
 
67
+ Or with conda:
68
+
69
+ ```bash
70
+ conda install -c conda-forge graphatoms
71
+ ```
72
+
51
73
  ## Development
52
74
 
53
75
  For development setup with pixi:
@@ -57,6 +79,16 @@ pixi install
57
79
  pixi run test
58
80
  ```
59
81
 
82
+ ## Running Tests
83
+
84
+ ```bash
85
+ # Run all tests
86
+ pytest src/tests/ -v
87
+
88
+ # Run benchmark tests
89
+ pytest src/tests-benchmark/ -v
90
+ ```
91
+
60
92
  ## License
61
93
 
62
94
  GPL-3.0-or-later
@@ -9,7 +9,7 @@ Issues = "https://github.com/LiuGaoyong/GraphAtoms/issues/"
9
9
 
10
10
  [project]
11
11
  name = "graphatoms"
12
- version = "1.1.3"
12
+ version = "1.1.5"
13
13
  readme = "README.md"
14
14
  description = "The Chemical Core Class for Graph Theory Analysis."
15
15
  authors = [{ name = "LiuGaoyong", email = "liugaoyong_88@163.com" }]
@@ -37,6 +37,8 @@ dependencies = [
37
37
  # Scientific Computing
38
38
  # numpy pandas, scipy
39
39
  "scikit-learn>=1.5",
40
+ "array-api-compat>=1.10",
41
+ "array_api-extra>=0.10",
40
42
  "pyarrow",
41
43
 
42
44
  # Graph Theory
@@ -45,8 +47,10 @@ dependencies = [
45
47
  # Data Model
46
48
  "h5py>=3.16",
47
49
  "hydra-core",
50
+ "numpy>=2.0.0,<3",
48
51
  "numpydantic",
49
- "pydantic>=2.11",
52
+ "ovld", # singledispatch which works for multiple arguments.
53
+ "pydantic>=2.10",
50
54
  "python-snappy>=0.7.3", # More Fase Data Compression
51
55
  "tomli; python_version < '3.11'", # use tomllib in python>=3.11
52
56
  "tomli-w", # TOML writer
@@ -56,6 +60,7 @@ dependencies = [
56
60
  [dependency-groups]
57
61
  dev = [
58
62
  "ruff>=0.11",
63
+ "array-api-strict",
59
64
  "pytest>=8.3",
60
65
  "pytest-xdist",
61
66
  "jupyter",
@@ -93,7 +98,7 @@ testpaths = ['src/tests']
93
98
  [tool.ruff]
94
99
  line-length = 80
95
100
  indent-width = 4
96
- select = ["F", "E", "W", "UP", "D"]
101
+ select = ["F", "E", "W", "UP"]
97
102
  ignore = ["F722", "D100"]
98
103
  [tool.ruff.lint.pydocstyle]
99
104
  convention = "google"
@@ -106,7 +111,7 @@ backend = { name = "pixi-build-python", version = "*" }
106
111
  [tool.pixi.workspace]
107
112
  preview = ["pixi-build"]
108
113
  channels = ["conda-forge"]
109
- platforms = ["win-64", "linux-64", "osx-arm64"]
114
+ platforms = ["linux-64", "osx-arm64"]
110
115
 
111
116
  [tool.pixi.pypi-dependencies]
112
117
  graphatoms = { path = ".", editable = true }
@@ -117,11 +122,14 @@ dev = { features = ["dev"], solve-group = "default" }
117
122
 
118
123
  [tool.pixi.tasks]
119
124
  test = "pytest -s -vv"
120
- benchmark = 'pytest -s src/benchmark/*.py'
125
+ benchmark = 'pytest -s src/tests-benchmark/*.py'
121
126
 
122
127
  [tool.pixi.dependencies]
123
128
  python = ">=3.12"
124
129
  pytest = ">=9.0.3,<10"
130
+ array-api-compat = ">=1.15.0,<2"
131
+ array-api-extra = ">=0.11.0,<0.12"
132
+ array-api-strict = ">=2.5,<3"
125
133
  ase = ">=3.28.0,<4"
126
134
  pymatgen = ">=2026.5.4,<2027"
127
135
  rdkit = ">=2025.9.5,<2027"
@@ -129,9 +137,16 @@ openbabel = ">=3.1.1,<4"
129
137
  pyarrow = ">=21.0.0,<25"
130
138
  scikit-learn = ">=1.8.0,<2"
131
139
  python-igraph = ">=0.11.9,<0.12"
140
+ numpy = ">=2.0.0,<3"
141
+ pydantic = ">=2.10.0,<3"
132
142
  numpydantic = ">=1.8.1,<2"
133
143
  python-snappy = ">=0.7.3,<0.8"
134
144
  h5py = ">=3.16.0,<4"
135
145
  hydra-core = ">=1.3.2,<2"
136
146
  tomli-w = ">=1.2.0,<2"
137
147
  loguru = ">=0.7.3,<0.8"
148
+ pytorch = ">=2.10.0,<3"
149
+ jax = ">=0.9.0,<0.10"
150
+ jupyterlab = ">=4.5.8,<5"
151
+ ovld = ">=0.5.15,<0.6"
152
+ pytest-xdist = ">=3.8.0,<4"
@@ -0,0 +1,11 @@
1
+ """The array api wrapper of this packages."""
2
+
3
+ from ._array_api_compat import get_namespace
4
+ from ._array_api_typing import Array, ArrayNamespace, LinalgNamespace
5
+
6
+ __all__ = [
7
+ "get_namespace",
8
+ "ArrayNamespace",
9
+ "LinalgNamespace",
10
+ "Array",
11
+ ]
@@ -0,0 +1,15 @@
1
+ from array_api_compat import array_namespace
2
+ from array_api_compat.common._typing import Namespace
3
+
4
+ from ._array_api_typing import Array, ArrayNamespace
5
+
6
+
7
+ def get_namespace(
8
+ *xs: Array | complex | None,
9
+ use_compat: bool | None = None,
10
+ ) -> ArrayNamespace | Namespace:
11
+ return array_namespace(
12
+ *xs, # type: ignore[reportOptionalMemberAccess]
13
+ use_compat=use_compat,
14
+ # api_version="2024.12",
15
+ ) # type: ignore[reportOptionalMemberAccess]