class_docstr: Represents a mathematical object with indices.
  
  >>> from sympy import Indexed, IndexedBase, Idx, symbols
  >>> i, j = symbols('i j', cls=Idx)
  >>> Indexed('A', i, j)
  A[i, j]
  
  It is recommended that ``Indexed`` objects be created by indexing ``IndexedBase``:
  ``IndexedBase('A')[i, j]`` instead of ``Indexed(IndexedBase('A'), i, j)``.
  
  >>> A = IndexedBase('A')
  >>> a_ij = A[i, j]           # Prefer this,
  >>> b_ij = Indexed(A, i, j)  # over this.
  >>> a_ij == b_ij
  True
class_docstr_tok: ["Represents","a","mathematical","object","with","indices",".",">",">",">","from","sympy","import","Indexed",",","IndexedBase",",","Idx",",","symbols",">",">",">","i",",","j","=","symbols","(","'","i","j","'",",","cls=Idx",")",">",">",">","Indexed","(","'","A","'",",","i",",","j",")","A","[","i",",","j","]","It","is","recommended","that","``","Indexed","``","objects","be","created","by","indexing","``","IndexedBase","``",":","``","IndexedBase","(","'","A","'",")","[","i",",","j","]","``","instead","of","``","Indexed","(","IndexedBase","(","'","A","'",")",",","i",",","j",")","``",".",">",">",">","A","=","IndexedBase","(","'","A","'",")",">",">",">","a_ij","=","A","[","i",",","j","]","#","Prefer","this",",",">",">",">","b_ij","=","Indexed","(","A",",","i",",","j",")","#","over","this",".",">",">",">","a_ij","==","b_ij","True"]
docstr: Returns a list with dimensions of each index.
  
  Dimensions is a property of the array, not of the indices.  Still, if
  the ``IndexedBase`` does not define a shape attribute, it is assumed
  that the ranges of the indices correspond to the shape of the array.
  
  >>> from sympy import IndexedBase, Idx, symbols
  >>> n, m = symbols('n m', integer=True)
  >>> i = Idx('i', m)
  >>> j = Idx('j', m)
  >>> A = IndexedBase('A', shape=(n, n))
  >>> B = IndexedBase('B')
  >>> A[i, j].shape
  (n, n)
  >>> B[i, j].shape
  (m, m)
code: def shape(self):
      """Returns a list with dimensions of each index.
  
      Dimensions is a property of the array, not of the indices.  Still, if
      the ``IndexedBase`` does not define a shape attribute, it is assumed
      that the ranges of the indices correspond to the shape of the array.
  
      >>> from sympy import IndexedBase, Idx, symbols
      >>> n, m = symbols('n m', integer=True)
      >>> i = Idx('i', m)
      >>> j = Idx('j', m)
      >>> A = IndexedBase('A', shape=(n, n))
      >>> B = IndexedBase('B')
      >>> A[i, j].shape
      (n, n)
      >>> B[i, j].shape
      (m, m)
      """
  
      if self.base.shape:
          return self.base.shape
      sizes = []
      for i in self.indices:
          upper = getattr(i, "upper", None)
          lower = getattr(i, "lower", None)
          if None in (upper, lower):
              raise IndexException(
                  filldedent(
                      """
                      Range is not defined for all indices in: %s"""
                      % self
                  )
              )
          try:
              size = upper - lower + 1
          except TypeError:
              raise IndexException(
                  filldedent(
                      """
                      Shape cannot be inferred from Idx with
                      undefined range: %s"""
                      % self
                  )
              )
          sizes.append(size)
      return Tuple(*sizes)
  
imports: from collections.abc import Iterable
  from sympy.core.numbers import Number
  from sympy.core.assumptions import StdFactKB
  from sympy.core import Expr, Tuple, sympify, S
  from sympy.core.symbol import _filter_assumptions, Symbol
  from sympy.core.logic import fuzzy_bool, fuzzy_not
  from sympy.core.sympify import _sympify
  from sympy.functions.special.tensor_functions import KroneckerDelta
  from sympy.multipledispatch import dispatch
  from sympy.utilities.iterables import is_sequence, NotIterable
  from sympy.utilities.misc import filldedent
label_desc: Use image node_id 10 for calling the Indexed obj's underlying member method code with example usage: obj.shape() and returns: Tuple, self