Rudolf Adamkovič Personal site


Example: The _like variants inherit shape and dtype

import numpy as np

a = np.array([10, 20, 30])
b = np.empty_like(a)

(b.shape, b.dtype)
((3,), dtype('int64'))

© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.