Skip to content

Commit abee135

Browse files
alimuldalcopybara-github
authored andcommitted
Replace a few more deprecated numpy aliases of builtin types
See https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations PiperOrigin-RevId: 414674669 Change-Id: I74847aac15d815458a3974baa26d1c8683d3f4df
1 parent f836684 commit abee135

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dm_env/specs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class BoundedArray(Array):
170170
integer types. The following spec will be satisfied by arrays
171171
with values in the set {0, 1, 2}:
172172
```python
173-
spec = BoundedArray((3, 4), np.int, minimum=0, maximum=2)
173+
spec = BoundedArray((3, 4), int, minimum=0, maximum=2)
174174
```
175175
176176
Note that one or both bounds may be infinite. For example, the set of

dm_env/specs_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def testGenerateValue(self):
300300
spec.validate(test_value)
301301

302302
def testScalarBounds(self):
303-
spec = specs.BoundedArray((), np.float, minimum=0.0, maximum=1.0)
303+
spec = specs.BoundedArray((), float, minimum=0.0, maximum=1.0)
304304

305305
self.assertIsInstance(spec.minimum, np.ndarray)
306306
self.assertIsInstance(spec.maximum, np.ndarray)

0 commit comments

Comments
 (0)