Skip to content

Commit

Permalink
array_like --> numpy.ndarray
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Oct 24, 2023
1 parent 055e3c8 commit 05f9000
Show file tree
Hide file tree
Showing 21 changed files with 106 additions and 106 deletions.
4 changes: 2 additions & 2 deletions galpy/actionAngle/actionAngleHarmonicInverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def _xvFreqs(self, j, angle, **kwargs):
-------
tuple
Tuple containing:
- x (array_like): x-coordinate.
- vx (array_like): Velocity in x-direction.
- x (numpy.ndarray): x-coordinate.
- vx (numpy.ndarray): Velocity in x-direction.
- Omega (float): Frequency.
Notes
Expand Down
4 changes: 2 additions & 2 deletions galpy/actionAngle/actionAngleStaeckel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,9 +1493,9 @@ def estimateDeltaStaeckel(pot, R, z, no_median=False, delta0=1e-6):
Parameters
----------
pot : Potential instance or list thereof
R : float or array_like
R : float or numpy.ndarray
coordinates
z : float or array_like
z : float or numpy.ndarray
coordinates
no_median : bool, optional
if True, and input is array, return all calculated values of delta (useful for quickly estimating delta for many phase space points)
Expand Down
6 changes: 3 additions & 3 deletions galpy/actionAngle/actionAngleStaeckel_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ def actionAngleStaeckel_calcu0(E, Lz, pot, delta):
Parameters
----------
E : array_like
E : numpy.ndarray
Energy.
Lz : array_like
Lz : numpy.ndarray
Angular momentum.
pot : Potential or list of such instances
Potential or list of such instances.
delta : array_like
delta : numpy.ndarray
Focal length of prolate spheroidal coordinates.
Returns
Expand Down
32 changes: 16 additions & 16 deletions galpy/actionAngle/actionAngleVerticalInverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ def _evaluate(self, j, angle, **kwargs):
----------
j : float
Action
angle : array_like
angle : numpy.ndarray
Angle
Returns
-------
Expand All @@ -1053,7 +1053,7 @@ def _xvFreqs(self, j, angle, **kwargs):
----------
j : float
Action.
angle : array_like
angle : numpy.ndarray
Angle.
Returns
Expand Down Expand Up @@ -1223,17 +1223,17 @@ def _anglea(xa, E, pot, omega, ptcoeffs, ptderivcoeffs, xmax, ptxmax, vsign=1.0)
Parameters
----------
xa : array_like
xa : numpy.ndarray
Position.
E : float
Energy.
pot : Potential object
The potential.
omega : array_like
omega : numpy.ndarray
Harmonic-oscillator frequencies.
ptcoeffs : array_like
ptcoeffs : numpy.ndarray
Coefficients of the polynomial point transformation.
ptderivcoeffs : array_like
ptderivcoeffs : numpy.ndarray
Coefficients of the derivative of the polynomial point transformation.
xmax : float
Xmax of the true torus.
Expand Down Expand Up @@ -1283,19 +1283,19 @@ def _danglea(
Parameters
----------
xa : array_like
xa : numpy.ndarray
Position.
E : float
Energy.
pot : Potential object
The potential.
omega : array_like
omega : numpy.ndarray
Harmonic-oscillator frequencies.
ptcoeffs : array_like
ptcoeffs : numpy.ndarray
Coefficients of the polynomial point transformation.
ptderivcoeffs : array_like
ptderivcoeffs : numpy.ndarray
Coefficients of the derivative of the polynomial point transformation.
ptderiv2coeffs : array_like
ptderiv2coeffs : numpy.ndarray
Coefficients of the second derivative of the polynomial point transformation.
xmax : float
Xmax of the true torus.
Expand Down Expand Up @@ -1348,17 +1348,17 @@ def _ja(xa, E, pot, omega, ptcoeffs, ptderivcoeffs, xmax, ptxmax):
Parameters
----------
xa : array_like
xa : numpy.ndarray
position
E : array_like
E : numpy.ndarray
Energy
pot : Potential object
the potential
omega : array_like
omega : numpy.ndarray
harmonic-oscillator frequencies
ptcoeffs : array_like
ptcoeffs : numpy.ndarray
coefficients of the polynomial point transformation
ptderivcoeffs : array_like
ptderivcoeffs : numpy.ndarray
coefficients of the derivative of the polynomial point transformation
xmax : float
xmax of the true torus
Expand Down
8 changes: 4 additions & 4 deletions galpy/df/sphericaldf.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def dMdE(self, E):
Parameters
----------
E : float or array_like
E : float or numpy.ndarray
Energy; can be a Quantity
Returns
Expand Down Expand Up @@ -325,11 +325,11 @@ def sample(self, R=None, z=None, phi=None, n=1, return_orbit=True, rmin=0.0):
Parameters
----------
R : float, array_like, Quantity, or None, optional
R : float, numpy.ndarray, Quantity, or None, optional
If set, sample velocities at this radius. If array, sample velocities at these radii, ignoring n.
z : float, array_like, Quantity, or None, optional
z : float, numpy.ndarray, Quantity, or None, optional
If set, sample velocities at this height. If array, sample velocities at these heights, ignoring n.
phi : float, array_like, Quantity, or None, optional
phi : float, numpy.ndarray, Quantity, or None, optional
If set, sample velocities at this azimuth. If array, sample velocities at these azimuths, ignoring n.
n : int, optional
Number of samples to generate. Default is 1.
Expand Down
8 changes: 4 additions & 4 deletions galpy/df/streamdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __init__(
Galactocentric radius of the Sun (kpc) (can be different from ro) (default: 8.0).
Zsun : float or Quantity, optional
Sun's height above the plane (kpc) (default: 0.0208).
vsun : array_like or Quantity, optional
vsun : numpy.ndarray or Quantity, optional
Sun's motion in cylindrical coordinates (vR positive away from center) (can be Quantity array, but not a list of Quantities) (default: [-11.1, 8.0 * 30.24, 7.25]).
multi : int, optional
If set, use multi-processing (default: None).
Expand All @@ -153,7 +153,7 @@ def __init__(
If True, approximate the stream assuming that the frequency is constant along the stream (only works with useTM, for which this leads to a significant speed-up) (default: False).
useTMHessian : bool, optional
If True, compute the basic Hessian dO/dJ_prog using TM; otherwise use aA (default: False).
custom_transform : array_like, optional
custom_transform : numpy.ndarray, optional
Matrix implementing the rotation from (ra,dec) to a custom set of sky coordinates (default: None).
Notes
Expand Down Expand Up @@ -3134,7 +3134,7 @@ def callMarg(self, xy, **kwargs):
Parameters
----------
xy : array_like
xy : numpy.ndarray
Phase-space point [X,Y,Z,vX,vY,vZ]; the distribution of the dimensions set to None is returned.
interp : bool, optional
If True, use the interpolated stream track. Default is True.
Expand Down Expand Up @@ -3316,7 +3316,7 @@ def gaussApprox(self, xy, **kwargs):
Parameters
----------
xy : array_like
xy : numpy.ndarray
Phase-space point [X,Y,Z,vX,vY,vZ]; the distribution of the dimensions set to None is returned.
interp : bool, optional
If True, use the interpolated stream track. Default is True.
Expand Down
4 changes: 2 additions & 2 deletions galpy/df/streamgapdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, *args, **kwargs):
Galactocentric radius of the Sun (kpc) (can be different from ro) (default: 8.0).
Zsun : float or Quantity, optional
Sun's height above the plane (kpc) (default: 0.0208).
vsun : array_like or Quantity, optional
vsun : numpy.ndarray or Quantity, optional
Sun's motion in cylindrical coordinates (vR positive away from center) (can be Quantity array, but not a list of Quantities) (default: [-11.1, 8.0 * 30.24, 7.25]).
multi : int, optional
If set, use multi-processing (default: None).
Expand All @@ -98,7 +98,7 @@ def __init__(self, *args, **kwargs):
If True, approximate the stream assuming that the frequency is constant along the stream (only works with useTM, for which this leads to a significant speed-up) (default: False).
useTMHessian : bool, optional
If True, compute the basic Hessian dO/dJ_prog using TM; otherwise use aA (default: False).
custom_transform : array_like, optional
custom_transform : numpy.ndarray, optional
Matrix implementing the rotation from (ra,dec) to a custom set of sky coordinates (default: None).
impactb : float or Quantity, optional
Impact parameter (can be Quantity) (default: 1.0).
Expand Down
Loading

0 comments on commit 05f9000

Please sign in to comment.