cee92691ad858952b4ed46c08cad6cc682868d22,gym/spaces/box.py,Box,__init__,#Box#Any#Any#Any#Any#,16
Before Change
assert np.isscalar(low) and np.isscalar(high)
low = low + np.zeros(shape)
high = high + np.zeros(shape)
if dtype is None: // Autodetect type
if (high == 255).all():
dtype = np.uint8
else:
dtype = np.float32
logger.warn("gym.spaces.Box autodetected dtype as {}. Please provide explicit dtype.".format(dtype))
self.low = low.astype(dtype)
self.high = high.astype(dtype)
super(Box, self).__init__(shape, dtype)
self.np_random = np.random.RandomState()
After Change
assert np.isscalar(low) and np.isscalar(high)
self.shape = tuple(shape)
self.low = np.full(self.shape, low)
self.high = np.full(self.shape, high)
low = low + np.zeros(shape)
high = high + np.zeros(shape)
self.low = self.low.astype(self.dtype)
self.high = self.high.astype(self.dtype)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: openai/gym
Commit Name: cee92691ad858952b4ed46c08cad6cc682868d22
Time: 2019-03-24
Author: zuoxingdong@users.noreply.github.com
File Name: gym/spaces/box.py
Class Name: Box
Method Name: __init__
Project Name: biotite-dev/biotite
Commit Name: 9c1f289b1dce08abf5577319046f00de640393aa
Time: 2019-02-12
Author: bauer@cbs.tu-darmstadt.de
File Name: src/biotite/structure/rdf.py
Class Name:
Method Name: rdf
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 0c7eb42974f916c9919dd285a1faa8c837a4f78b
Time: 2019-04-10
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/zoo.py
Class Name: ZooAttack
Method Name: _generate_bss