Skip to content

Commit 634d9e6

Browse files
committed
DOC: improvements to setDiscreteBasedOnModel docstring as suggest by @MateusStano
1 parent 0e253a5 commit 634d9e6

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

rocketpy/Function.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,12 @@ def setDiscrete(
474474
return self
475475

476476
def setDiscreteBasedOnModel(self, modelFunction, oneByOne=True):
477-
"""This method transforms a Function instance defined from callables into a
478-
Function instance defined by a list of discrete points.
479-
It does so based on a model Function, from which it retrieves the domain,
480-
domain name, interpolation method and extrapolation method.
481-
It then evaluates the original Function instance in all points of the retrieved
482-
domain to generate the list of discrete points that will be used for
483-
interpolation when this Function is called.
477+
"""This method transforms the domain of Function instance into a list of
478+
discrete points based on the domain of a model Function instance. It does so by
479+
retrieving the domain, domain name, interpolation method and extrapolation
480+
method of the model Function instance. It then evaluates the original Function
481+
instance in all points of the retrieved domain to generate the list of discrete
482+
points that will be used for interpolation when this Function is called.
484483
485484
Parameters
486485
----------
@@ -505,7 +504,7 @@ def setDiscreteBasedOnModel(self, modelFunction, oneByOne=True):
505504
506505
Examples
507506
--------
508-
This method is particularly useful when algebraic operations is carried out
507+
This method is particularly useful when algebraic operations are carried out
509508
using Function instances defined by different discretized domains (same range,
510509
but different mesh size). Once an algebraic operation is done, it will not
511510
directly be applied between the list of discrete points of the two Function

0 commit comments

Comments
 (0)