
# future imports
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function

# global imports
import abc

# local imports
from ..utils.models import Parameterized

# exported symbols
__all__ = ['Likelihood', 'RealLikelihood']


class Likelihood(Parameterized):
    """
    Likelihood interface.
    """
    @abc.abstractmethod
    def transform(self, y):
        pass


class RealLikelihood(Likelihood):
    def transform(self, y):
        return np.array(y, ndmin=1, dtype=float, copy=False)


# future imports
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function

# global imports
import numpy as np
import abc

# local imports
from ..utils.models import Parameterized

# exported symbols
__all__ = ['Likelihood', 'RealLikelihood']


class Likelihood(Parameterized):
    """
    Likelihood interface.
    """
    @abc.abstractmethod
    def transform(self, y):
        pass


class RealLikelihood(Likelihood):
    def transform(self, y):
        return np.array(y, ndmin=1, dtype=float, copy=False)

Fix bug in RealLikelihood due to not importing numpy.
Fix bug in RealLikelihood due to not importing numpy.

  
  # future imports
  from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  
  # global imports
+ import numpy as np
  import abc
  
  # local imports
  from ..utils.models import Parameterized
  
  # exported symbols
  __all__ = ['Likelihood', 'RealLikelihood']
  
  
  class Likelihood(Parameterized):
      """
      Likelihood interface.
      """
      @abc.abstractmethod
      def transform(self, y):
          pass
  
  
  class RealLikelihood(Likelihood):
      def transform(self, y):
          return np.array(y, ndmin=1, dtype=float, copy=False)
  
Fix bug in RealLikelihood due to not importing numpy.
## Code Before:

# future imports
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function

# global imports
import abc

# local imports
from ..utils.models import Parameterized

# exported symbols
__all__ = ['Likelihood', 'RealLikelihood']


class Likelihood(Parameterized):
    """
    Likelihood interface.
    """
    @abc.abstractmethod
    def transform(self, y):
        pass


class RealLikelihood(Likelihood):
    def transform(self, y):
        return np.array(y, ndmin=1, dtype=float, copy=False)

## Instruction:
Fix bug in RealLikelihood due to not importing numpy.
## Code After:

# future imports
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function

# global imports
import numpy as np
import abc

# local imports
from ..utils.models import Parameterized

# exported symbols
__all__ = ['Likelihood', 'RealLikelihood']


class Likelihood(Parameterized):
    """
    Likelihood interface.
    """
    @abc.abstractmethod
    def transform(self, y):
        pass


class RealLikelihood(Likelihood):
    def transform(self, y):
        return np.array(y, ndmin=1, dtype=float, copy=False)
