Skip to content

Commit

Permalink
Introduce result_type() function
Browse files Browse the repository at this point in the history
* Introduce `result_type()` to find the smallest NumPy dtype that
  accomodates all parameters.
* Support `cupyx.scipy.sparse.csr_matrix` with `dtype=bool`.
  • Loading branch information
uellue committed Jan 10, 2023
1 parent 79f6d3e commit dc44d6e
Show file tree
Hide file tree
Showing 3 changed files with 255 additions and 86 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,23 @@ and to perform efficient conversion to supported formats as needed.

## Still TODO

* cupyx.sparse formats with dtype `bool`
* PyTorch arrays
* SciPy sparse arrays as opposed to SciPy sparse matrices.
* More detailed cost metric based on more real-world use cases and parameters.

## Changelog

### 0.2.0

* Introduce `result_type()` to find the smallest NumPy dtype that accomodates
all parameters. Allowed as parameters are all valid arguments to
`numpy.result_type(...)` plus backend specifiers.
* Support `cupyx.scipy.sparse.csr_matrix` with `dtype=bool`.

### 0.1.1

Initial release

## Known issues

* `conda install -c conda-forge cupy` on Python 3.7 and Windows 11 may install `cudatoolkit` 10.1 and `cupy` 8.3, which have sporadically produced invalid data structures for `cupyx.sparse.csc_matrix` for unknown reasons. This doesn't happen with current versions. Running the benchmark function `benchmark_conversions()` can help to debug such issues since it performs all pairwise conversions and checks for correctness.
Expand Down
Loading

0 comments on commit dc44d6e

Please sign in to comment.