@@ -560,7 +560,7 @@ def __contains__(self, point):
560560 False
561561 """
562562 return self ._contains (point )
563-
563+
564564 def __eq__ (self , other ):
565565 r"""
566566 Compare ``self`` with ``other``.
@@ -755,8 +755,7 @@ def _compute_facets(self):
755755 constants = (constants [1 ], constants [0 ])
756756 self .is_reflexive .set_cache (all (c == 1 for c in constants ))
757757 if self .is_reflexive ():
758- polar = LatticePolytope (
759- normals , compute_vertices = False , lattice = N )
758+ polar = LatticePolytope (normals , compute_vertices = False , lattice = N )
760759 polar .dim .set_cache (self .dim ())
761760 polar .is_reflexive .set_cache (True )
762761 polar ._polar = self
@@ -798,20 +797,17 @@ def _contains(self, point, region='whole polytope'):
798797
799798 INPUT:
800799
801- - ``point`` -- anything. An attempt will be made to convert it into a
802- single element of the ambient space of ``self``. If it fails,
803- ``False`` is returned;
800+ - ``point`` -- an attempt will be made to convert it into a
801+ single element of the ambient space of ``self``; if it fails,
802+ ``False`` is returned
804803
805- - ``region`` -- string. Can be either 'whole polytope' (default),
806- 'interior', or 'relative interior'.
804+ - ``region`` -- string; can be either `` 'whole polytope'`` (default),
805+ `` 'interior'`` , or `` 'relative interior'``
807806
808807 OUTPUT:
809808
810809 - ``True`` if ``point`` is contained in the specified ``region`` of
811- ``self``, ``False`` otherwise.
812-
813- Raises a ``ValueError`` if ``region`` is not one of the
814- three allowed values.
810+ ``self``, ``False`` otherwise
815811
816812 TESTS::
817813
@@ -822,9 +818,9 @@ def _contains(self, point, region='whole polytope'):
822818 try :
823819 point = _ambient_space_point (self , point )
824820 except TypeError as ex :
825- if str (ex ).endswith ("have incompatible lattices! " ):
821+ if str (ex ).endswith ("have incompatible lattices" ):
826822 warnings .warn ("you have checked if a cone contains a point "
827- "from an incompatible lattice, this is False! " ,
823+ "from an incompatible lattice, this is False" ,
828824 stacklevel = 3 )
829825 return False
830826
@@ -1666,14 +1662,14 @@ def contains(self, *args):
16661662
16671663 INPUT:
16681664
1669- - anything. An attempt will be made to convert all arguments into a
1670- single element of the ambient space of ``self``. If it fails,
1671- ``False`` will be returned.
1665+ - an attempt will be made to convert all arguments into a
1666+ single element of the ambient space of ``self``; if it fails,
1667+ ``False`` will be returned
16721668
16731669 OUTPUT:
16741670
16751671 - ``True`` if the given point is contained in ``self``, ``False``
1676- otherwise.
1672+ otherwise
16771673
16781674 EXAMPLES::
16791675
@@ -1697,8 +1693,9 @@ def dim(self):
16971693 r"""
16981694 Return the dimension of this polytope.
16991695
1700- EXAMPLES: We create a 3-dimensional octahedron and check its
1701- dimension::
1696+ EXAMPLES:
1697+
1698+ We create a 3-dimensional octahedron and check its dimension::
17021699
17031700 sage: o = lattice_polytope.cross_polytope(3)
17041701 sage: o.dim()
@@ -1763,9 +1760,9 @@ def distances(self, point=None):
17631760 [0 2 2 0 1]
17641761 sage: p.distances((1/2, 3, 0))
17651762 (9/2, -3/2, -5/2, 7/2)
1766-
1763+
17671764 This point is not even in the affine subspace of the polytope::
1768-
1765+
17691766 sage: p.distances((1, 1, 1))
17701767 (3, 1, -1, 1)
17711768 """
@@ -2121,24 +2118,24 @@ def faces(self, dim=None, codim=None):
21212118 def facet_constant (self , i ):
21222119 r"""
21232120 Return the constant in the ``i``-th facet inequality of this polytope.
2124-
2125- This is equivalent to ``facet_constants()[i]``
2121+
2122+ This is equivalent to ``facet_constants()[i]``.
21262123
21272124 INPUT:
21282125
2129- - ``i`` - integer, the index of the facet
2126+ - ``i`` -- integer; the index of the facet
21302127
21312128 OUTPUT:
21322129
21332130 - integer -- the constant in the ``i``-th facet inequality.
21342131
21352132 .. SEEALSO::
2136-
2133+
21372134 :meth:`facet_constants`,
21382135 :meth:`facet_normal`,
21392136 :meth:`facet_normals`,
21402137 :meth:`facets`.
2141-
2138+
21422139 EXAMPLES::
21432140
21442141 sage: o = lattice_polytope.cross_polytope(3)
@@ -2158,15 +2155,15 @@ def facet_constants(self):
21582155
21592156 OUTPUT:
21602157
2161- - an integer vector.
2158+ - an integer vector
21622159
21632160 .. SEEALSO::
2164-
2161+
21652162 :meth:`facet_constant`,
21662163 :meth:`facet_normal`,
21672164 :meth:`facet_normals`,
21682165 :meth:`facets`.
2169-
2166+
21702167 EXAMPLES:
21712168
21722169 For reflexive polytopes all constants are 1::
@@ -2207,23 +2204,23 @@ def facet_normal(self, i):
22072204 r"""
22082205 Return the inner normal to the ``i``-th facet of this polytope.
22092206
2210- This is equivalent to ``facet_normals()[i]``
2207+ This is equivalent to ``facet_normals()[i]``.
22112208
22122209 INPUT:
22132210
2214- - ``i`` -- integer, the index of the facet
2211+ - ``i`` -- integer; the index of the facet
22152212
22162213 OUTPUT:
22172214
22182215 - a vector
2219-
2216+
22202217 .. SEEALSO::
2221-
2218+
22222219 :meth:`facet_constant`,
22232220 :meth:`facet_constants`,
22242221 :meth:`facet_normals`,
22252222 :meth:`facets`.
2226-
2223+
22272224 EXAMPLES::
22282225
22292226 sage: o = lattice_polytope.cross_polytope(3)
@@ -2247,12 +2244,12 @@ def facet_normals(self):
22472244 :meth:`dual_lattice` of ``self``.
22482245
22492246 .. SEEALSO::
2250-
2247+
22512248 :meth:`facet_constant`,
22522249 :meth:`facet_constants`,
22532250 :meth:`facet_normal`,
22542251 :meth:`facets`.
2255-
2252+
22562253 EXAMPLES:
22572254
22582255 Normals to facets of an octahedron are vertices of a cube::
0 commit comments