#30215 closed enhancement (fixed)

VectorSpaces: Add a parent method dimension

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.2
Component: linear algebra Keywords:
Cc: tscrim, gh-kliem, egourgoulhon, gh-mjungmath Merged in:
Authors: Matthias Koeppe Reviewers: Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: cd0b81a (Commits, GitHub, GitLab) Commit: cd0b81a08da1d5f06a938a749767f609967f999c
Dependencies: Stopgaps:

Status badges

Description

... as an alias for rank (which is provided by free modules).

Currently it is provided by some but not all implementations of vector spaces:

sage: C = CombinatorialFreeModule(QQ, ['x', 'y'])
sage: C.rank()
2
sage: C.dimension()
2

sage: F = FiniteRankFreeModule(QQ, 2)
sage: F.rank()
2
sage: F.dimension()
AttributeError: 'FiniteRankFreeModule_with_category' object has no attribute 'dimension'

(from #30204)

Change History (5)

comment:1 Changed 14 months ago by mkoeppe

  • Branch set to u/mkoeppe/vectorspaces__add_a_parent_method_dimension

comment:2 Changed 14 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to cd0b81a08da1d5f06a938a749767f609967f999c
  • Status changed from new to needs_review

New commits:

cd0b81aVectorSpaces: Add parent method dimension

comment:3 Changed 14 months ago by egourgoulhon

  • Reviewers set to Eric Gourgoulhon
  • Status changed from needs_review to positive_review

LGTM. Thanks!

comment:4 Changed 14 months ago by mkoeppe

Thanks!

comment:5 Changed 14 months ago by vbraun

  • Branch changed from u/mkoeppe/vectorspaces__add_a_parent_method_dimension to cd0b81a08da1d5f06a938a749767f609967f999c
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.