Commit df85a40f authored by David A.. Werner's avatar David A.. Werner
Browse files

Corrected some documentation mistakes/errors

parent d96402f7
......@@ -89,7 +89,7 @@ class Manduca(object):
def legs(self):
"""This function gets the legs for a specified Manduca.
:returns: int -- the legs of the Manduca.
:returns: numpy.array -- the legs of the Manduca.
"""
return self._legs
......@@ -115,7 +115,7 @@ class Manduca(object):
def muscles(self):
"""This function gets the muscles for a specified Manduca.
:returns: int -- the muscles of the Manduca.
:returns: numpy.array -- the muscles of the Manduca.
"""
return self._muscles
......@@ -139,9 +139,9 @@ class Manduca(object):
@property
def time_step(self):
"""This function gets the current time step for a specified Manduca.
"""This function gets the simulation time step for a specified Manduca.
:returns: int -- the current time step for the Manduca.
:returns: float -- the simulation time step for the Manduca.
"""
return self._time_step
......@@ -195,7 +195,7 @@ class Manduca(object):
:param manduca: The Manduca to evaluated.
:type manduca: Manduca.
:returns: int -- the distance the Manduca has traveled.
:returns: float -- the distance the Manduca has traveled.
"""
positions, velocites, times = manduca.simulate(record_level=0)
......@@ -372,7 +372,7 @@ class Manduca(object):
0 -> initial/final only
1 -> once for each interval
2 -> every sub-interval
* -> default to 0
\* -> default to 0
:param sub_intervals: the number of subintervals simulated in the physics for each time interval/
:type sub_intervals: int.
......@@ -518,8 +518,8 @@ class Manduca(object):
:type cls: Manduca.
:param file_name: The name of the file to be loaded from
:type file_name: string.
:param *other_params: Additional parameters.
:type *other_params: optional args.
:param \*other_params: Additional properties to load from the file and pass as \*args
:param \**kwargs: kwargs passed to cls.__init__
"""
kwargs_copy = dict(kwargs)
......@@ -531,6 +531,7 @@ class Manduca(object):
args = []
for param in other_params:
args.append(results[param])
# TODO: This should be removed (body_properties are saved with the manduca now)
if 'body_properties' not in kwargs_copy or kwargs_copy['body_properties'] is None:
kwargs_copy['body_properties'] = ManducaBodyProperties(*results['body_properties'])
new_manduca = cls(legs, muscles, time_step, *args, **kwargs_copy)
......@@ -564,8 +565,7 @@ class SimpleManduca(Manduca):
:type muscles: int.
:param time_step: the time of one interval.
:type time_step: int.
:param **kwargs: keyword args passed to super.
:type **kwargs: keyword args.
:param \**kwargs: keyword args passed to super.
"""
super(SimpleManduca, self).__init__(legs, muscles, time_step, **kwargs)
......@@ -585,8 +585,7 @@ class SimpleManduca(Manduca):
:type time_step: int.
:param time_step: the time of one interval.
:type time_step: int.
:param **kwargs: keyword args passed to super.
:type **kwargs: keyword args.
:param \**kwargs: keyword args passed to super.
:returns: Manduca -- the new random Manduca.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment