Skip to content

Commit 84eb1c6

Browse files
authored
Merge pull request #184 from coreweave/eta/numpy
fix(serialization): Don't use obsolete `np.product` alias for `np.prod`
2 parents 2cee68a + 0d25dfc commit 84eb1c6

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- Fixed compatibility with `numpy>=2.0.0`
13+
- Calls to the removed `numpy.product` function now use `numpy.prod` instead
14+
815
## [2.9.1] - 2024-11-27
916

1017
### Fixed
@@ -409,6 +416,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
409416
- `get_gpu_name`
410417
- `no_init_or_tensor`
411418

419+
[Unreleased]: https://github.com/coreweave/tensorizer/compare/v2.9.1...HEAD
412420
[2.9.1]: https://github.com/coreweave/tensorizer/compare/v2.9.0...v2.9.1
413421
[2.9.0]: https://github.com/coreweave/tensorizer/compare/v2.8.1...v2.9.0
414422
[2.8.1]: https://github.com/coreweave/tensorizer/compare/v2.8.0...v2.8.1

tensorizer/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.9.1"
1+
__version__ = "2.9.2"

tensorizer/serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def deserialized_length(self):
221221
if self.data_length > 0:
222222
return self.data_length
223223
element_size: int = numpy.dtype(self.dtype).itemsize
224-
num_elements: int = numpy.product(self.shape)
224+
num_elements: int = numpy.prod(self.shape)
225225
return element_size * num_elements
226226

227227

0 commit comments

Comments
 (0)