Skip to content

Improve string representation of Advanced(Inc)Subtensor#1931

Open
AdishreeB wants to merge 2 commits intopymc-devs:v3from
AdishreeB:enh-advanced-subtensor-repr
Open

Improve string representation of Advanced(Inc)Subtensor#1931
AdishreeB wants to merge 2 commits intopymc-devs:v3from
AdishreeB:enh-advanced-subtensor-repr

Conversation

@AdishreeB
Copy link

Moves str_from_slice and str_from_indices from Subtensor to BaseSubtensor and adds a shared str method. AdvancedIncSubtensor and IncSubtensor now use super() to call these methods. AdvancedSubtensor inherits str directly from BaseSubtensor.

Related Issue

Checklist

  • Checked that the pre-commit linting/style checks pass
  • Included tests that prove the fix is effective or that the new feature works
  • Added necessary documentation (docstrings and/or example notebooks)
  • If you are a pro: each commit corresponds to a relevant logical change

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@ricardoV94 ricardoV94 changed the title refactor __str__ methods to use BaseSubtensor Improve string representation of Advanced(Inc)Subtensor Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Advanced(Inc)Subtensor test representation

2 participants