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

Commit

Permalink
altered the deprecation message to be the correct one for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Oct 18, 2019
1 parent a22010c commit 6b37686
Showing 1 changed file with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ AUTHOR:
#*****************************************************************************

from __future__ import absolute_import, division, print_function
from sage.misc.superseded import deprecated_function_alias

import numbers
from sage.rings.integer cimport smallInteger
Expand Down Expand Up @@ -396,17 +397,6 @@ cdef class CombinatorialFace(SageObject):
sage: it = C.face_iter()
sage: all(face.n_ambient_Vrepresentation() == len(face.Vrepr()) for face in it)
True
"""
if self._dual:
return smallInteger(self.set_coatom_repr())
else:
return smallInteger(self.n_atom_rep())

def n_Vrepr(self):
r"""
.. SEEALSO::
:meth:`CombinatorialFace.n_ambient_Vrepresentation`
TESTS::
Expand All @@ -415,12 +405,15 @@ cdef class CombinatorialFace(SageObject):
sage: it = C.face_iter()
sage: face = next(it)
sage: _ = face.n_Vrepr()
doctest:...: DeprecationWarning: the method n_Vrepr of CombinatorialFace is deprecated
doctest:...: DeprecationWarning: n_Vrepr is deprecated. Please use n_ambient_Vrepresentation instead.
See https://trac.sagemath.org/28614 for details.
"""
from sage.misc.superseded import deprecation
deprecation(28614, "the method n_Vrepr of CombinatorialFace is deprecated")
return self.n_ambient_Vrepresentation()
if self._dual:
return smallInteger(self.set_coatom_repr())
else:
return smallInteger(self.n_atom_rep())

n_Vrepr = deprecated_function_alias(28614, n_ambient_Vrepresentation)

def Hrepr(self, names=True):
r"""
Expand Down Expand Up @@ -523,12 +516,24 @@ cdef class CombinatorialFace(SageObject):
sage: it = C.face_iter()
sage: all(face.n_ambient_Hrepresentation() == len(face.Hrepr()) for face in it)
True
TESTS::
sage: P = polytopes.cube()
sage: C = CombinatorialPolyhedron(P)
sage: it = C.face_iter()
sage: face = next(it)
sage: _ = face.n_Hrepr()
doctest:...: DeprecationWarning: n_Hrepr is deprecated. Please use n_ambient_Hrepresentation instead.
See https://trac.sagemath.org/28614 for details.
"""
if not self._dual:
return smallInteger(self.set_coatom_repr())
else:
return smallInteger(self.n_atom_rep())

n_Hrepr = deprecated_function_alias(28614, n_ambient_Hrepresentation)

def n_Hrepr(self):
r"""
.. SEEALSO::
Expand All @@ -542,7 +547,7 @@ cdef class CombinatorialFace(SageObject):
sage: it = C.face_iter()
sage: face = next(it)
sage: _ = face.n_Hrepr()
doctest:...: DeprecationWarning: the method n_Hrepr of CombinatorialFace is deprecated
doctest:...: DeprecationWarning: n_Hrepr is deprecated. Please use n_ambient_Hrepresentation instead.
See https://trac.sagemath.org/28614 for details.
"""
from sage.misc.superseded import deprecation
Expand Down

0 comments on commit 6b37686

Please sign in to comment.