Zscore calculation


I’m trying to standard my loaded data before training the model using scipy.stats.zscore().
I systematically get this message:

/anaconda3/lib/python3.9/site-packages/scipy/stats/_stats_py.py:2899: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /pytorch/torch/csrc/utils/tensor_numpy.cpp:143.)
z[np.broadcast_to(isconst, z.shape)] = np.nan

How can I avoid this warning ?
I calculated it manually but I feel it’s better to use a predefined function scipy.stats.zscore().