Skip to content

Commit 61bd086

Browse files
committed
partial cython-lint in plot folder
1 parent f3acd42 commit 61bd086

File tree

7 files changed

+6
-20
lines changed

7 files changed

+6
-20
lines changed

src/sage/plot/complex_plot.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ def complex_to_cmap_rgb(z_values, cmap='turbo', contoured=False, tiled=False,
578578
cdef unsigned int i, j, imax, jmax
579579
cdef double x, y, mag, arg
580580
cdef double lightness_delta
581-
cdef double r, g, b
582581
cdef ComplexDoubleElement z
583582
from sage.rings.complex_double import CDF
584583

src/sage/plot/plot3d/base.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ AUTHORS:
5050
# ****************************************************************************
5151

5252
from cpython.list cimport *
53-
from cpython.object cimport PyObject
5453

5554
import os
5655
import sys

src/sage/plot/plot3d/implicit_surface.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ cimport numpy as np
8181
import numpy as np
8282

8383
from sage.plot.plot3d.transform cimport point_c, face_c, color_c, Transformation
84-
from sage.plot.plot3d.base cimport PrimitiveObject
85-
from sage.plot.plot3d.base import RenderParams, default_texture
8684
from sage.plot.plot3d.index_face_set cimport IndexFaceSet
8785
from sage.rings.real_double import RDF
8886
from sage.plot.misc import setup_for_eval_on_grid

src/sage/plot/plot3d/index_face_set.pyx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ AUTHORS:
3232
# ****************************************************************************
3333

3434
from textwrap import dedent
35-
from sage.misc.superseded import deprecation_cython as deprecation
3635

37-
from libc.math cimport isfinite, INFINITY
36+
from libc.math cimport INFINITY
3837
from libc.string cimport memset, memcpy
3938
from cysignals.memory cimport check_calloc, check_allocarray, check_reallocarray, sig_free
4039
from cysignals.signals cimport sig_check, sig_on, sig_off
@@ -53,15 +52,10 @@ from cpython.bytes cimport *
5352

5453
include "point_c.pxi"
5554

56-
57-
from math import sin, cos, sqrt
58-
from random import randint
59-
6055
from sage.cpython.string cimport bytes_to_str
6156

6257
from sage.rings.real_double import RDF
6358

64-
from sage.matrix.constructor import matrix
6559
from sage.modules.free_module_element import vector
6660

6761
from sage.plot.colors import Color, float_to_integer
@@ -1637,9 +1631,7 @@ cdef class IndexFaceSet(PrimitiveObject):
16371631
sage: T = S.dual()
16381632
sage: len(T.vertex_list())
16391633
6
1640-
16411634
"""
1642-
cdef point_c P
16431635
cdef face_c *face
16441636
cdef Py_ssize_t i, j, ix, ff
16451637
cdef IndexFaceSet dual = IndexFaceSet([], **kwds)

src/sage/plot/plot3d/parametric_surface.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ cdef class ParametricSurface(IndexFaceSet):
88
cdef object colormap
99
cdef int eval_grid(self, urange, vrange) except -1
1010
cdef int eval_c(self, point_c *res, double u, double v) except -1
11-

src/sage/plot/plot3d/point_c.pxi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,3 @@ cdef inline double sin_face_angle(face_c F, face_c E, point_c* vlist):
145145
face_c_normal(&nE, E, vlist)
146146
cdef double dot = point_c_dot(nF, nE)
147147
return math.sqrt(1-(dot*dot)/(point_c_dot(nF, nF)*point_c_dot(nE, nE)))
148-

src/sage/plot/plot3d/shapes.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ EXAMPLES::
5050
# https://www.gnu.org/licenses/
5151
# ****************************************************************************
5252

53-
from libc.math cimport sqrt, sin, cos, tan, asin, acos, atan, M_PI
53+
from libc.math cimport sqrt, sin, cos, acos, M_PI
5454
from sage.rings.real_double import RDF
5555
from sage.modules.free_module_element import vector
5656
from sage.misc.decorators import rename_keyword
57-
from .base import Graphics3dGroup, Graphics3d
57+
from .base import Graphics3dGroup
5858
from .index_face_set cimport IndexFaceSet, PrimitiveObject
5959
from .transform cimport point_c
6060

@@ -948,7 +948,7 @@ cdef class Sphere(ParametricSurface):
948948
([-10.0, ..., 10.0],
949949
[0.0, ..., 3.141592653589793, ..., 0.0])
950950
"""
951-
cdef int K, u_res, v_res
951+
cdef int u_res, v_res
952952
u_res = min(max(int(M_PI*self.radius/ds), 6), 20)
953953
v_res = min(max(int(2*M_PI * self.radius/ds), 6), 36)
954954
urange = [-10.0] + [M_PI * k/u_res - M_PI/2 for k in range(1, u_res)] + [10.0]
@@ -961,8 +961,8 @@ cdef class Sphere(ParametricSurface):
961961
elif u == 10:
962962
res.x, res.y, res.z = 0, 0, self.radius
963963
else:
964-
res.x = self.radius*cos(v) * cos(u)
965-
res.y = self.radius*sin(v) * cos(u)
964+
res.x = self.radius * cos(v) * cos(u)
965+
res.y = self.radius * sin(v) * cos(u)
966966
res.z = self.radius * sin(u)
967967

968968

0 commit comments

Comments
 (0)