# Path: signalz/misc.py
# def check_type_or_raise(obj, expected_type, obj_name):
#     """
#     This fuction raises error if the object does not have expected type.
#     """
#     if not isinstance(obj, expected_type):
#         raise TypeError(
#             "'{}' must be {}, not {}".format(
#                 obj_name,
#                 expected_type.__name__,
#                 obj.__class__.__name__)
#             )


import numpy as np
import signalz
from signalz.misc import check_type_or_raise
    
    **Args:**
    
    * `n` - length of the output data (int) -
      how many samples will be on output
    
    * `ns` - number of points (int) in original noise before interpolation,
      this number cannot be higher than desired length of data;
      if it is set to 0, then `ns=n` is used; this number is related to number
      of direction changes in resulting walk
    
    **Kwargs:**
    
    * `alpha` - characteristic exponent index of used Levy noise
      (float) in range `0<alpha<2`
      
    * `beta` - skeewness of used Levy noise (float) in range `-1<beta<1`

    * `sigma` - diffusion of used Levy noise (float);
      in case of gaussian distribution it is
      standard deviation

    * `position` - position parameter (float) of used Levy noise
    
    **Returns:**
    
    * vector of values representing the walk (1d array)
    """
    # check params
    check_type_or_raise(ns, int, "ns")

# Path: signalz/misc.py
# def check_type_or_raise(obj, expected_type, obj_name):
#     """
#     This fuction raises error if the object does not have expected type.
#     """
#     if not isinstance(obj, expected_type):
#         raise TypeError(
#             "'{}' must be {}, not {}".format(
#                 obj_name,
#                 expected_type.__name__,
#                 obj.__class__.__name__)
#             )


# Path: signalz/generators/levy_walk.py
import numpy as np
import signalz
from signalz.misc import check_type_or_raise

    
    **Args:**
    
    * `n` - length of the output data (int) -
      how many samples will be on output
    
    * `ns` - number of points (int) in original noise before interpolation,
      this number cannot be higher than desired length of data;
      if it is set to 0, then `ns=n` is used; this number is related to number
      of direction changes in resulting walk
    
    **Kwargs:**
    
    * `alpha` - characteristic exponent index of used Levy noise
      (float) in range `0<alpha<2`
      
    * `beta` - skeewness of used Levy noise (float) in range `-1<beta<1`

    * `sigma` - diffusion of used Levy noise (float);
      in case of gaussian distribution it is
      standard deviation

    * `position` - position parameter (float) of used Levy noise
    
    **Returns:**
    
    * vector of values representing the walk (1d array)
    """
    # check params
    check_type_or_raise(ns, int, "ns")

    check_type_or_raise(n, int, "n")