diff --git a/wisdem/ccblade/Polar.py b/wisdem/ccblade/Polar.py index 9bcb7f019..2cd5ee153 100644 --- a/wisdem/ccblade/Polar.py +++ b/wisdem/ccblade/Polar.py @@ -1844,7 +1844,7 @@ def _intersections(x1, y1, x2, y2, plot=False, minDist=1e-6, verbose=False): """ INTERSECTIONS Intersections of curves. Computes the (x,y) locations where two curves intersect. The curves - can be broken with NaNs or have vertical segments. + can be broken with nans or have vertical segments. Written by: Sukhbinder, https://github.com/sukhbinder/intersection adapted by E.Branlard to allow for minimum distance between points @@ -1915,7 +1915,7 @@ def _rectangle_intersection_(x1, y1, x2, y2): try: T[:, i] = np.linalg.solve(AA[:, :, i], BB[:, i]) except: - T[:, i] = np.NaN + T[:, i] = np.nan in_range = (T[0, :] >= 0) & (T[1, :] >= 0) & (T[0, :] <= 1) & (T[1, :] <= 1) diff --git a/wisdem/ccblade/ccblade.py b/wisdem/ccblade/ccblade.py index 9c094de76..95a27f098 100644 --- a/wisdem/ccblade/ccblade.py +++ b/wisdem/ccblade/ccblade.py @@ -997,7 +997,7 @@ def distributedAeroLoads(self, Uinf, Omega, pitch, azimuth): ) = self.__loads(phi_star, rotating, *args) if np.isnan(Np[i]): - print(f"NaNs at {i}/{n}: {phi_lower} {phi_star} {phi_upper}") + print(f"nans at {i}/{n}: {phi_lower} {phi_star} {phi_upper}") a[i] = 0.0 ap[i] = 0.0 Np[i] = 0.0 diff --git a/wisdem/landbosse/model/CollectionCost.py b/wisdem/landbosse/model/CollectionCost.py index 73f4cfadc..b195900a5 100644 --- a/wisdem/landbosse/model/CollectionCost.py +++ b/wisdem/landbosse/model/CollectionCost.py @@ -387,7 +387,7 @@ def calc_num_turb_partial_strings(self, num_leftover_turb, num_turb_per_cable): # Check to make sure there aren't any zeros in num_turbines_per_cable, which is used as the denominator # in the division above (this happens when not all of the cable types in the input sheet need to be used). - # If there is a zero, then print a warning and change NaN to 0 in perc_partial_string. + # If there is a zero, then print a warning and change nan to 0 in perc_partial_string. if 0.0 in num_turb_per_cable: print( f'Warning: {self.project_name} CollectionCost module generates number of turbines per string that ' diff --git a/wisdem/orbit/core/vessel.py b/wisdem/orbit/core/vessel.py index 96ddd5515..7c08505e4 100644 --- a/wisdem/orbit/core/vessel.py +++ b/wisdem/orbit/core/vessel.py @@ -93,7 +93,7 @@ def extract_vessel_dayrate(self): self.day_rate = self.config["vessel_specs"]["day_rate"] except KeyError: - self.day_rate = np.NaN + self.day_rate = np.nan def mobilize(self): """ @@ -390,9 +390,9 @@ def update_trip_data(self, cargo=True, deck=True, items=True): if storage is None: raise Exception("Vessel does not have storage capacity.") - _cargo = storage.current_cargo_mass if cargo else np.NaN - _deck = storage.current_deck_space if deck else np.NaN - _items = dict(Counter(i for i in storage.items)) if items else np.NaN + _cargo = storage.current_cargo_mass if cargo else np.nan + _deck = storage.current_deck_space if deck else np.nan + _items = dict(Counter(i for i in storage.items)) if items else np.nan trip = Trip(cargo_mass=_cargo, deck_space=_deck, items=_items) @@ -413,7 +413,7 @@ def cargo_mass_utilizations(self): return np.array(self.cargo_mass_list) / max_cargo_mass except MissingComponent: - return np.array(np.NaN) + return np.array(np.nan) @property def deck_space_list(self): @@ -430,14 +430,14 @@ def deck_space_utilizations(self): return np.array(self.deck_space_list) / max_deck_space except MissingComponent: - return np.array(np.NaN) + return np.array(np.nan) @property def max_cargo_mass_utilization(self): """Returns maximum cargo mass utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.max(self.cargo_mass_utilizations) @@ -446,7 +446,7 @@ def min_cargo_mass_utilization(self): """Returns minimum cargo mass utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.min(self.cargo_mass_utilizations) @@ -455,7 +455,7 @@ def mean_cargo_mass_utilization(self): """Returns mean cargo mass utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.mean(self.cargo_mass_utilizations) @@ -464,7 +464,7 @@ def median_cargo_mass_utilization(self): """Returns median cargo mass utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.median(self.cargo_mass_utilizations) @@ -473,7 +473,7 @@ def max_deck_space_utilization(self): """Returns maximum deck_space utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.max(self.deck_space_utilizations) @@ -482,7 +482,7 @@ def min_deck_space_utilization(self): """Returns minimum deck_space utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.min(self.deck_space_utilizations) @@ -491,7 +491,7 @@ def mean_deck_space_utilization(self): """Returns mean deck space utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.mean(self.deck_space_utilizations) @@ -500,7 +500,7 @@ def median_deck_space_utilization(self): """Returns median deck space utilization.""" if not self.trip_data: - return np.NaN + return np.nan return np.median(self.deck_space_utilizations) @@ -509,7 +509,7 @@ def max_items_by_mass(self): """Returns items corresponding to `self.max_cargo_mass`.""" if not self.trip_data: - return np.NaN + return np.nan i = np.argmax(self.cargo_mass_list) return self.trip_data[i].items @@ -519,7 +519,7 @@ def min_items_by_mass(self): """Returns items corresponding to `self.min_cargo_mass`.""" if not self.trip_data: - return np.NaN + return np.nan i = np.argmin(self.cargo_mass_list) return self.trip_data[i].items @@ -529,7 +529,7 @@ def max_items_by_space(self): """Returns items corresponding to `self.max_deck_space`.""" if not self.trip_data: - return np.NaN + return np.nan i = np.argmax(self.deck_space_list) return self.trip_data[i].items @@ -539,7 +539,7 @@ def min_items_by_space(self): """Returns items corresponding to `self.min_deck_space`.""" if not self.trip_data: - return np.NaN + return np.nan i = np.argmin(self.deck_space_list) return self.trip_data[i].items diff --git a/wisdem/orbit/parametric.py b/wisdem/orbit/parametric.py index ae0ff2451..f8f855c66 100644 --- a/wisdem/orbit/parametric.py +++ b/wisdem/orbit/parametric.py @@ -149,7 +149,7 @@ def map_funcs(obj, funcs): ) except AttributeError: - res = np.NaN + res = np.nan results[k] = res