
from pyeda.boolalg import expr
from pyeda.boolalg import bfarray

def bitvec(name, *dims):
    """Return a new array of given dimensions, filled with Expressions.

    Parameters
    ----------
    name : str
    dims : (int or (int, int))
        An int N means a slice from [0:N]
        A tuple (M, N) means a slice from [M:N]
    """
    if dims:
        return bfarray.exprvars(name, *dims)
    else:
        return expr.exprvar(name)



from warnings import warn

from pyeda.boolalg import expr
from pyeda.boolalg import bfarray

def bitvec(name, *dims):
    """Return a new array of given dimensions, filled with Expressions.

    Parameters
    ----------
    name : str
    dims : (int or (int, int))
        An int N means a slice from [0:N]
        A tuple (M, N) means a slice from [M:N]
    """
    warn("The 'bitvec' function is deprecated. Use 'exprvars' instead.")
    if dims:
        return bfarray.exprvars(name, *dims)
    else:
        return expr.exprvar(name)


Add deprecation warning to bitvec function
Add deprecation warning to bitvec function

+ 
+ from warnings import warn
  
  from pyeda.boolalg import expr
  from pyeda.boolalg import bfarray
  
  def bitvec(name, *dims):
      """Return a new array of given dimensions, filled with Expressions.
  
      Parameters
      ----------
      name : str
      dims : (int or (int, int))
          An int N means a slice from [0:N]
          A tuple (M, N) means a slice from [M:N]
      """
+     warn("The 'bitvec' function is deprecated. Use 'exprvars' instead.")
      if dims:
          return bfarray.exprvars(name, *dims)
      else:
          return expr.exprvar(name)
  
  
Add deprecation warning to bitvec function
## Code Before:

from pyeda.boolalg import expr
from pyeda.boolalg import bfarray

def bitvec(name, *dims):
    """Return a new array of given dimensions, filled with Expressions.

    Parameters
    ----------
    name : str
    dims : (int or (int, int))
        An int N means a slice from [0:N]
        A tuple (M, N) means a slice from [M:N]
    """
    if dims:
        return bfarray.exprvars(name, *dims)
    else:
        return expr.exprvar(name)


## Instruction:
Add deprecation warning to bitvec function
## Code After:

from warnings import warn

from pyeda.boolalg import expr
from pyeda.boolalg import bfarray

def bitvec(name, *dims):
    """Return a new array of given dimensions, filled with Expressions.

    Parameters
    ----------
    name : str
    dims : (int or (int, int))
        An int N means a slice from [0:N]
        A tuple (M, N) means a slice from [M:N]
    """
    warn("The 'bitvec' function is deprecated. Use 'exprvars' instead.")
    if dims:
        return bfarray.exprvars(name, *dims)
    else:
        return expr.exprvar(name)

