
import numpy as np


def cubic_rectification(x):
    """
    Rectified cube of an array.

    Parameters
    ----------
    x : numpy.ndarray
        Input array.

    Returns
    -------
    numpy.ndarray
        Elementwise, the cube of `x` where it is positive and ``0`` otherwise.

    Note
    ----
    This is a sample function, using a numpy docstring format.

    Note
    ----
    The use of intersphinx will cause :class:`numpy.ndarray` to link to
    the numpy documentation page.
    """
    return np.maximum(0, x ** 3)


import numpy as np


def cubic_rectification(x, verbose=False):
    """
    Rectified cube of an array.

    Parameters
    ----------
    x : numpy.ndarray
        Input array.
    verbose : bool, optional
        Whether to print out details. Default is ``False``.

    Returns
    -------
    numpy.ndarray
        Elementwise, the cube of `x` where it is positive and ``0`` otherwise.

    Note
    ----
    This is a sample function, using a numpy docstring format.

    Note
    ----
    The use of intersphinx will cause :class:`numpy.ndarray` to link to
    the numpy documentation page.
    """
    if verbose:
        print("Cubing and then rectifying {}".format(x))
    return np.maximum(0, x ** 3)

Add verbose argument to cubic_rectification
ENH: Add verbose argument to cubic_rectification

  
  import numpy as np
  
  
- def cubic_rectification(x):
+ def cubic_rectification(x, verbose=False):
      """
      Rectified cube of an array.
  
      Parameters
      ----------
      x : numpy.ndarray
          Input array.
+     verbose : bool, optional
+         Whether to print out details. Default is ``False``.
  
      Returns
      -------
      numpy.ndarray
          Elementwise, the cube of `x` where it is positive and ``0`` otherwise.
  
      Note
      ----
      This is a sample function, using a numpy docstring format.
  
      Note
      ----
      The use of intersphinx will cause :class:`numpy.ndarray` to link to
      the numpy documentation page.
      """
+     if verbose:
+         print("Cubing and then rectifying {}".format(x))
      return np.maximum(0, x ** 3)
  
Add verbose argument to cubic_rectification
## Code Before:

import numpy as np


def cubic_rectification(x):
    """
    Rectified cube of an array.

    Parameters
    ----------
    x : numpy.ndarray
        Input array.

    Returns
    -------
    numpy.ndarray
        Elementwise, the cube of `x` where it is positive and ``0`` otherwise.

    Note
    ----
    This is a sample function, using a numpy docstring format.

    Note
    ----
    The use of intersphinx will cause :class:`numpy.ndarray` to link to
    the numpy documentation page.
    """
    return np.maximum(0, x ** 3)

## Instruction:
Add verbose argument to cubic_rectification
## Code After:

import numpy as np


def cubic_rectification(x, verbose=False):
    """
    Rectified cube of an array.

    Parameters
    ----------
    x : numpy.ndarray
        Input array.
    verbose : bool, optional
        Whether to print out details. Default is ``False``.

    Returns
    -------
    numpy.ndarray
        Elementwise, the cube of `x` where it is positive and ``0`` otherwise.

    Note
    ----
    This is a sample function, using a numpy docstring format.

    Note
    ----
    The use of intersphinx will cause :class:`numpy.ndarray` to link to
    the numpy documentation page.
    """
    if verbose:
        print("Cubing and then rectifying {}".format(x))
    return np.maximum(0, x ** 3)
