Skip to content

Commit 1a92165

Browse files
ArmavicaricardoV94
authored andcommitted
Replace deprecated tostring with tobytes
1 parent fb86c46 commit 1a92165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/printing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ def hex_digest(x):
18471847
Returns a short, mostly hexadecimal hash of a numpy ndarray
18481848
"""
18491849
assert isinstance(x, np.ndarray)
1850-
rval = hashlib.sha256(x.tostring()).hexdigest()
1850+
rval = hashlib.sha256(x.tobytes()).hexdigest()
18511851
# hex digest must be annotated with strides to avoid collisions
18521852
# because the buffer interface only exposes the raw data, not
18531853
# any info about the semantics of how that data should be arranged

0 commit comments

Comments
 (0)