Skip to content

Commit

Permalink
Move least_squares import to function where it is required
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Oct 16, 2023
1 parent fdcfecd commit a11dfb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion galsim/fitswcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import warnings
import os
import numpy as np
from scipy.optimize import least_squares
import astropy.wcs
import subprocess
import copy
Expand Down Expand Up @@ -1784,6 +1783,8 @@ def FittedSIPWCS(x, y, ra, dec, wcs_type='TAN', order=3, center=None):
the tangent plane is centered. [default: None, which means
use the average position of the list of reference stars]
"""
from scipy.optimize import least_squares

if order < 1:
raise GalSimValueError("Illegal SIP order", order)

Expand Down

0 comments on commit a11dfb4

Please sign in to comment.