Commit e2305864 authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Call the copy() class member rather than the base numpy function. Quick...

Call the copy() class member rather than the base numpy function. Quick testing shows it is faster: 1.1 μs vs 2.7 μs for an array of 2000 elements.
parent 2bf64fad
......@@ -212,9 +212,9 @@ class SED(object):
# If the SED luminosity table is empty, then there is nothing to
# compute.
if self.luminosity is None:
self.wavelength_grid = np.copy(results_wavelengths)
self.luminosity = np.copy(results_lumin)
self.luminosities = np.copy(results_lumin)
self.wavelength_grid = results_wavelengths.copy()
self.luminosity = results_lumin.copy()
self.luminosities = results_lumin.copy()
else:
# If the added luminosity contribution changes the SED wavelength
# grid, we interpolate everything on a common wavelength grid.
......
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