mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-17 08:56:08 +00:00
Copy by default
This commit is contained in:
parent
f7af08bea4
commit
546fbca20c
1 changed files with 2 additions and 2 deletions
|
|
@ -92,10 +92,10 @@ class BaseBuffer(object):
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def to_torch(self, array: np.ndarray, copy: bool = False) -> th.Tensor:
|
def to_torch(self, array: np.ndarray, copy: bool = True) -> th.Tensor:
|
||||||
"""
|
"""
|
||||||
Convert a numpy array to a PyTorch tensor.
|
Convert a numpy array to a PyTorch tensor.
|
||||||
Note: it does not copy the data by default
|
Note: it copies the data by default
|
||||||
|
|
||||||
:param array: (np.ndarray)
|
:param array: (np.ndarray)
|
||||||
:param copy: (bool) Whether to copy or not the data
|
:param copy: (bool) Whether to copy or not the data
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue