Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit fe77320

Browse files
change output type
1 parent b1760ff commit fe77320

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sage/geometry/solid_angle.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,13 @@ def solid_angle_simplicial_2d(A):
106106
"""
107107
if not is_Matrix(A):
108108
A = matrix(A)
109+
P = A[0][0].parent()
109110
if A.nrows() != 2 or A.ncols() != 2:
110111
raise ValueError("input matrix has incorrect dimension")
111112
if any(r == 0 for r in A.rows()):
112113
raise ValueError("input matrix has a row that is zero")
113114
if A.rank() < 2:
114-
return 0
115+
return P.zero()
115116
u = A.row(0)
116117
v = A.row(1)
117118
p = u.dot_product(v)

0 commit comments

Comments
 (0)