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

add links to standard errors in toric folder #37772

Merged
merged 4 commits into from
Apr 12, 2024
Merged
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
10 changes: 6 additions & 4 deletions src/sage/schemes/toric/chow_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,14 @@ def _repr_(self) -> str:

def degree(self) -> int:
r"""
The degree of the Chow cycle.
Return the degree of the Chow cycle.

OUTPUT:

Integer. The complex dimension of the subvariety representing
the Chow cycle. Raises a ``ValueError`` if the Chow cycle is a
the Chow cycle.

This raises a :class:`ValueError` if the Chow cycle is a
sum of mixed degree cycles.

EXAMPLES::
Expand Down Expand Up @@ -354,7 +356,7 @@ def intersection_with_divisor(self, divisor):
OUTPUT:

A new :class:`ChowCycle`. If the divisor is not Cartier then
this method potentially raises a ``ValueError``, indicating
this method potentially raises a :class:`ValueError`, indicating
that the divisor cannot be made transversal to the Chow cycle.

EXAMPLES::
Expand Down Expand Up @@ -471,7 +473,7 @@ def cohomology_class(self):
If the toric variety is not simplicial, that is, has worse
than orbifold singularities, there is no way to associate a
cohomology class of the correct degree. In this case,
:meth:`cohomology_class` raises a ``ValueError``.
:meth:`cohomology_class` raises a :class:`ValueError`.

EXAMPLES::

Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/toric/divisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ def m(self, cone):
returned.

- If there is no such vector (i.e. ``self`` is not even a
`\QQ`-Cartier divisor), a ``ValueError`` is raised.
`\QQ`-Cartier divisor), a :class:`ValueError` is raised.

EXAMPLES::

Expand Down Expand Up @@ -773,7 +773,7 @@ def move_away_from(self, cone):
.. NOTE::

A divisor that is Weil but not Cartier might be impossible
to move away. In this case, a ``ValueError`` is raised.
to move away. In this case, a :class:`ValueError` is raised.

EXAMPLES::

Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/toric/divisor_class.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ cdef class ToricRationalDivisorClass(Vector_rational_dense):

cpdef _dot_product_(self, Vector right):
r"""
Raise a ``TypeError`` exception.
Raise a :class:`TypeError` exception.

Dot product is not defined on toric rational divisor classes.

Expand All @@ -214,7 +214,7 @@ cdef class ToricRationalDivisorClass(Vector_rational_dense):

OUTPUT:

- ``TypeError`` exception is raised.
A :class:`TypeError` exception is raised.

TESTS::

Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/toric/ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class ToricIdeal(MPolynomialIdeal):

You may specify the ambient polynomial ring via the
``polynomial_ring`` parameter or via the ``names`` and
``base_ring`` parameter. A ``ValueError`` is raised if you
``base_ring`` parameter. A :class:`ValueError` is raised if you
specify both.

- ``algorithm`` -- string (optional). The algorithm to use. For
Expand Down
33 changes: 18 additions & 15 deletions src/sage/schemes/toric/morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,8 @@ def as_fan_morphism(self):

OUTPUT: A :class:`SchemeMorphism_polynomial_toric_variety`.

Raises a ``TypeError`` if the morphism cannot be written in such a way.
This raises a :class:`TypeError` if the morphism cannot be written
in such a way.

EXAMPLES::

Expand Down Expand Up @@ -680,9 +681,10 @@ def as_polynomial_map(self):

OUTPUT:

A :class:`SchemeMorphism_polynomial_toric_variety`. Raises a
``TypeError`` if the morphism cannot be written in terms of
homogeneous polynomials.
A :class:`SchemeMorphism_polynomial_toric_variety`.

This raises a :class:`TypeError` if the morphism cannot be
written in terms of homogeneous polynomials.

The defining polynomials are not necessarily unique. There are
choices if multiple ambient space ray generators project to
Expand Down Expand Up @@ -716,7 +718,7 @@ def as_polynomial_map(self):
orbit = self.domain()
codomain_fan = self.codomain().fan()
R = orbit.coordinate_ring()
polys = [ R.one() ] * codomain_fan.nrays()
polys = [R.one()] * codomain_fan.nrays()
for i in self._defining_cone.ambient_ray_indices():
polys[i] = R.zero()
ray_index_map = self._reverse_ray_map()
Expand Down Expand Up @@ -1070,8 +1072,8 @@ def as_polynomial_map(self):

OUTPUT: A :class:`SchemeMorphism_polynomial_toric_variety`.

Raises a ``TypeError`` if the morphism cannot be written in terms of
homogeneous polynomials.
This raises a :class:`TypeError` if the morphism cannot be written
in terms of homogeneous polynomials.

EXAMPLES::

Expand Down Expand Up @@ -1104,8 +1106,8 @@ def as_polynomial_map(self):
'homogeneous polynomials')
polys[i] *= x**d
if phi.domain_fan().virtual_rays():
raise NotImplementedError("polynomial representations for fans "
"with virtual rays are not implemented yet")
raise NotImplementedError("polynomial representations for fans with"
" virtual rays are not implemented yet")
return SchemeMorphism_polynomial_toric_variety(self.parent(), polys)

def is_bundle(self):
Expand Down Expand Up @@ -1477,7 +1479,7 @@ def fiber_component(self, domain_cone, multiplicity=False):
embedding = SchemeMorphism_fan_fiber_component_toric_variety(self, domain_cone)
if multiplicity:
return embedding.domain(), \
self.fan_morphism().index(embedding.base_cone())
self.fan_morphism().index(embedding.base_cone())
else:
return embedding.domain()

Expand Down Expand Up @@ -1609,7 +1611,7 @@ def is_union_in_fan(self, c0, c1):
except ValueError:
return False

m = matrix(ZZ, n, n, lambda i,j:is_union_in_fan(self,prim[i], prim[j]))
m = matrix(ZZ, n, n, lambda i, j: is_union_in_fan(self, prim[i], prim[j]))

for i in range(n):
m[i, i] = 0
Expand Down Expand Up @@ -1727,9 +1729,10 @@ def as_polynomial_map(self):

OUTPUT:

A :class:`SchemeMorphism_polynomial_toric_variety`. Raises a
``ValueError`` if the morphism cannot be written in terms of
homogeneous polynomials.
A :class:`SchemeMorphism_polynomial_toric_variety`.

This raises a :class:`ValueError` if the morphism cannot be
written in terms of homogeneous polynomials.

EXAMPLES::

Expand Down Expand Up @@ -1830,7 +1833,7 @@ def projection(ray):
star_rays = set()
for cone in fm.relative_star_generators(defining_cone):
star_rays.update(cone.rays())
projected_rays = [ projection(r) for r in cone.rays() ]
projected_rays = [projection(r) for r in cone.rays()]
cones.append(Cone(projected_rays))
fiber_fan = Fan(cones)

Expand Down
Loading
Loading