Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoming0625 committed Dec 14, 2024
1 parent d74462e commit 86a9689
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions brainunit/_sparse_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

from jax.experimental.sparse import JAXSparse

__all__ = [
"SparseMatrix"
]


class SparseMatrix(JAXSparse):

Expand Down
2 changes: 2 additions & 0 deletions brainunit/sparse/coo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# ==============================================================================


from __future__ import annotations

import unittest

import brainstate as bst
Expand Down
4 changes: 2 additions & 2 deletions brainunit/sparse/csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from __future__ import annotations

import operator
from typing import Tuple
from typing import Tuple, Union

import jax
import jax.numpy as jnp
Expand Down Expand Up @@ -422,7 +422,7 @@ def tree_unflatten(cls, aux_data, children):
return obj


Data = jax.Array | Quantity
Data = Union[jax.Array, Quantity]
Indices = jax.Array
Indptr = jax.Array

Expand Down
2 changes: 2 additions & 0 deletions brainunit/sparse/csr_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.
# ==============================================================================

from __future__ import annotations

import unittest

import brainstate as bst
Expand Down

0 comments on commit 86a9689

Please sign in to comment.