Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warnings doc build #74

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
spharpy
=======

.. include:: header.rst
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# pytest.ini
[pytest]
norecursedirs = private
testpaths = tests
4 changes: 2 additions & 2 deletions spharpy/plot/cmap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from matplotlib import cm
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
import numpy as np

Expand All @@ -8,7 +8,7 @@ def phase_twilight(lut=512):
version of the twilight color map from matplotlib.
"""
lut = int(np.ceil(lut/4)*4)
twilight = cm.get_cmap('twilight', lut=lut)
twilight = plt.get_cmap('twilight', lut=lut)

twilight_r_colors = np.array(twilight.reversed().colors)

Expand Down
14 changes: 7 additions & 7 deletions spharpy/transforms/rotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def from_quat(cls, n_max, quat, **kwargs):
def from_matrix(cls, n_max, matrix, **kwargs):
"""Initialize from rotation matrix.
Rotations in 3 dimensions can be represented with 3 x 3 proper
orthogonal matrices [1]_. If the input is not proper orthogonal,
an approximation is created using the method described in [2]_.
orthogonal matrices [#]_. If the input is not proper orthogonal,
an approximation is created using the method described in [#]_.

Parameters
----------
Expand All @@ -206,8 +206,8 @@ def from_matrix(cls, n_max, matrix, **kwargs):

References
----------
.. [1] https://en.wikipedia.org/wiki/Rotation_matrix
.. [2] F. Landis Markley, “Unit Quaternion from Rotation Matrix”,
.. [#] https://en.wikipedia.org/wiki/Rotation_matrix
.. [#] F. Landis Markley, “Unit Quaternion from Rotation Matrix”,
Journal of guidance, control, and dynamics vol. 31.2,
pp. 440-442, 2008.

Expand Down Expand Up @@ -331,7 +331,7 @@ def rotation_z_axis(n_max, angle):
----------
.. [#] N. A. Gumerov and R. Duraiswami, “Recursions for the computation
of multipole translation and rotation coefficients for the 3-d
helmholtz equation,” vol. 25, no. 4, pp. 13441381, 2003.
helmholtz equation,” vol. 25, no. 4, pp. 1344-1381, 2003.


Examples
Expand Down Expand Up @@ -506,8 +506,8 @@ def wigner_d_rotation_real(n_max, alpha, beta, gamma):
----------
.. [#] M. A. Blanco, M. Flórez, and M. Bermejo, “Evaluation of the
rotation matrices in the basis of real spherical harmonics,”
Journal of Molecular Structure: THEOCHEM, vol. 419, no. 13,
pp. 1927, Dec. 1997, doi: 10.1016/S0166-1280(97)00185-1.
Journal of Molecular Structure: THEOCHEM, vol. 419, no. 1-3,
pp. 19-27, Dec. 1997, doi: 10.1016/S0166-1280(97)00185-1.

"""
n_sh = (n_max+1)**2
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def test_balloon_plot(icosahedron, make_coordinates, implementation):
coords = make_coordinates.create_coordinates(
implementation, rad, theta, phi)
data = np.cos(phi)*np.sin(theta)
spharpy.plot.balloon(coords, data, show=False)
spharpy.plot.balloon(coords, data)

spharpy.plot.balloon(coords, data, phase=True, show=False)
spharpy.plot.balloon(coords, data, phase=True)


@pytest.mark.parametrize("implementation", ['spharpy', 'pyfar'])
Expand All @@ -30,7 +30,7 @@ def test_contour_plot(icosahedron, make_coordinates, implementation):
implementation, rad, theta, phi)
data = np.cos(phi)*np.sin(theta)

spharpy.plot.contour(coords, np.abs(data), show=False)
spharpy.plot.contour(coords, np.abs(data))


@pytest.mark.parametrize("implementation", ['spharpy', 'pyfar'])
Expand Down
Loading