Skip to content

Commit

Permalink
MNT: fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Gui-FernandesBR committed Jul 6, 2024
1 parent 9398090 commit 9fb479b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions rocketpy/environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Environment: # pylint: disable=too-many-public-methods
True if the user already set a topographic profile. False otherwise.
Environment.max_expected_height : float
Maximum altitude in meters to keep weather data. The altitude must be
above sea level (ASL). Especially useful for controlling plottings.
above sea level (ASL). Especially useful for controlling plots.
Can be altered as desired by doing `max_expected_height = number`.
Environment.pressure_ISA : Function
Air pressure in Pa as a function of altitude as defined by the
Expand Down Expand Up @@ -962,7 +962,7 @@ def set_atmospheric_model( # pylint: disable=too-many-branches
.. note::
Time referece for the Forecasts are:
Time reference for the Forecasts are:
- ``GFS``: `Global` - 0.25deg resolution - Updates every 6
hours, forecast for 81 points spaced by 3 hours
Expand Down
15 changes: 8 additions & 7 deletions rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ def plot(self, *args, **kwargs):
elif self.__dom_dim__ == 2:
self.plot_2d(*args, **kwargs)
else:
print("Error: Only functions with 1D or 2D domains are plottable!")
print("Error: Only functions with 1D or 2D domains can be plotted.")

def plot1D(self, *args, **kwargs):
"""Deprecated method, use Function.plot_1d instead."""
Expand Down Expand Up @@ -2614,8 +2614,8 @@ def isbijective(self):
return len(distinct_map) == len(x_data_distinct) == len(y_data_distinct)
else:
raise TypeError(
"Only Functions whose source is a list of points can be "
"checked for bijectivity."
"`isbijective()` method only supports Functions whose "
"source is an array."
)

def is_strictly_bijective(self):
Expand Down Expand Up @@ -2667,8 +2667,8 @@ def is_strictly_bijective(self):
return np.all(y_data_diff >= 0) or np.all(y_data_diff <= 0)
else:
raise TypeError(
"Only Functions whose source is a list of points can be "
"checked for bijectivity."
"`is_strictly_bijective()` method only supports Functions "
"whose source is an array."
)

def inverse_function(self, approx_func=None, tol=1e-4):
Expand All @@ -2678,8 +2678,9 @@ def inverse_function(self, approx_func=None, tol=1e-4):
and only if F is bijective. Makes the domain the range and the range
the domain.
If the Function is given by a list of points, its bijectivity is
checked and an error is raised if it is not bijective.
If the Function is given by a list of points, the method
`is_strictly_bijective()` is called and an error is raised if the
Function is not bijective.
If the Function is given by a function, its bijection is not
checked and may lead to inaccuracies outside of its bijective region.
Expand Down
10 changes: 5 additions & 5 deletions rocketpy/simulation/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ def __check_export_list(self, export_list):
"lateral_surface_wind",
}
)
# NOTE: exportables needs to be updated with Flight numerical properties
# example: You added the property 'inclination' to Flight, so you may
# need to add it to exportables as well. But don't add other types.
exportables = set(
# NOTE: this list needs to be updated with Flight numerical properties
# example: You added the property 'inclination' to Flight.
# But don't add other types.
can_be_exported = set(
{
"inclination",
"heading",
Expand Down Expand Up @@ -456,7 +456,7 @@ def __check_export_list(self, export_list):
raise TypeError("Variables in export_list must be strings.")

# Checks if attribute is not valid
if attr not in exportables:
if attr not in can_be_exported:
raise ValueError(
f"Attribute '{attr}' can not be exported. Check export_list."
)
Expand Down

0 comments on commit 9fb479b

Please sign in to comment.