semvec/pypi-packages huggingface dataset:
dm-control2gym 0.0.2
dm_control suite for OpenAI Gym env

## Introduction
I simplified [martinseilair's](https://github.com/martinseilair/dm_control2gym) `dm_control2gym` as well as made it compatible with the latest `MuJoCo` library(e.g., 2.0.0). .... yeah,, I will upload the documents when I have time.



## Installation

```bash
$ pip install dm_control2gym
```



## Dependencies

- Please check the `requirements.txt` or just `pip install -r requirements.txt`



## Usage

- MDP tasks: `env` returns a state of a robot at each time-step

  `````python
  import itertools
  from dm_control2gym.util import make_dm2gym_env_state

  env = make_dm2gym_env_state(env_name="cheetah_run")

  state = env.reset()
  print("State shape: ", state.shape)

  total_reward = 0

  for t in itertools.count():
      action = env.action_space.sample()
      state, reward, done, _ = env.step(action)
      total_reward += reward

      if done: break

  env.close()
  print("Total Reward: {}".format(total_reward))
  `````

- POMDP tasks: `env` returns a raw image observation at each time-step

  `````python
  import itertools
  from dm_control2gym.util import make_dm2gym_env_obs
  from dm_control2gym.recorder import Monitor

  env = make_dm2gym_env_obs(env_name="cheetah_run", num_repeat_action=1)
  env = Monitor(env=env, directory="./log", force=True)

  obs = env.reset()
  print("Obs shape: ", obs.shape)

  total_reward = 0

  env.record_start()
  env.reset()
  for t in itertools.count():
      action = env.action_space.sample()
      obs, reward, done, _ = env.step(action)
      total_reward += reward

      if done: break

  env.record_end()
  env.close()
  print("Total Reward: {}".format(total_reward))
  `````




## Videos

<img src="assets/cartpole_balance.gif" width=30% height=30%> <img src="assets/cartpole_swingup.gif" width=30% height=30%> <img src="assets/cheetah_run.gif" width=30% height=30%>
<img src="assets/cup_catch.gif" width=30% height=30%> <img src="assets/finger_spin.gif" width=30% height=30%> <img src="assets/reacher_easy.gif" width=30% height=30%>
<img src="assets/walker_walk.gif" width=30% height=30%>


## For more details
Please refer to [martinseilair's](https://github.com/martinseilair/dm_control2gym) `dm_control2gym`
numpy-unit 0.1.1
A package providing an unit system for numpy multidimensionnal arrays.
Requires Python: >=3.6

# numpy-unit

[![Build Status](https://travis-ci.org/politinsa/numpy-unit.svg?branch=master)](https://travis-ci.org/politinsa/numpy-unit)
[![Documentation Status](https://readthedocs.org/projects/numpy-unit/badge/?version=latest)](https://numpy-unit.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/politinsa/numpy-unit/branch/master/graph/badge.svg)](https://codecov.io/gh/politinsa/numpy-unit)
[![license](https://img.shields.io/badge/license-Unlicense-blue)](https://github.com/politinsa/numpy-unit/blob/master/LICENSE)


This package provides a tool for scientific computing by keeping track of the unit when performing classical operations on a multi-dimensionnal array with (almost) no extra-cost comparing to the standard numpy array.  
The `ArrayUnit` class supports every operation a numpy.ndarray can handle (because it is a derived class of numpy.ndarray) but the operators are overloaded in order to perform transformations on the `Unit` contained in every `ArrayUnit`.

## Install

    pip install numpy-unit

## Examples

```python
>>> import numpy as np
>>> from numpy_unit import Unit, ArrayUnit
>>> 
>>> m = Unit('m')
>>> sm2 = Unit('s', -2)
>>> complex_unit = Unit({'my_unit': 0.5, '€': 1, 'capita': 2}) * (sm2**0.5) / m
>>> print(complex_unit)
€·capita²·my_unit^0.5·m⁻¹·s⁻¹
>>>
>>> arr = np.linspace(1,10,10, dtype=float)
>>> a = ArrayUnit(arr, m)
>>> b = ArrayUnit(arr**2, sm2)
>>> print(a, '\\n+\\n', 1, '\\n=\\n', a + 1)
[ 1.  2.  3.  4.  5.  6.  7.  8.  9. 10.] m
+
1 
=
[ 2.  3.  4.  5.  6.  7.  8.  9. 10. 11.] m
>>> print(a, '\\n*\\n', b, '\\n=\\n', a * b)
[ 1.  2.  3.  4.  5.  6.  7.  8.  9. 10.] m
*
[  1.   4.   9.  16.  25.  36.  49.  64.  81. 100.] s⁻²
=
[   1.    8.   27.   64.  125.  216.  343.  512.  729. 1000.] m·s⁻²
```

The following rules applied (where {op} is one of the following: [``+``, ``-``, ``*``, ``/``, ``//``, ``%``]):  

* ArrayUnit {op} Object returns an ArrayUnit with the same unit as the ArrayUnit
* Object {op} ArrayUnit returns an ArrayUnit with the same unit as the ArrayUnit
* ArrayUnit {op} ArrayUnit returns an ArrayUnit combining the Unit of the 2 ArrayUnit or an Error
* An Error might be raised only when two ArrayUnit are conflicting and that ArrayUnit.is_strict is set to True. Otherwise, it would print a warning.
* An ArrayUnit is equal to a numpy.ndarray if and only if their underlying arrays are equal (np.array_equal) and the Unit of the ArrayUnit is empty.

## Development
Doc of the master branch on [readthedocs.io](https://numpy-unit.readthedocs.io/en/latest/).

## Features
- [x] Basic unit system handling multiplication, division, modulo and power
- [x] ArrayUnit wrapper for unit + ndarray
- [x] Operators on ArrayUnit (and their variants __r{op}__ and __i{op}__)
     - [x] eq, ne
     - [x] add
     - [x] sub
     - [x] mul
     - [x] truediv, floordiv
     - [x] mod
     - [x] pow (but not __rpow__)
- [ ] Basic ndarray function
     - [ ] mean
     - [ ] std
     - [ ] ...
- [ ] conda release