def filter(input, reference):
    import numpy as np
    output = np.zeros(input.shape, dtype=np.float64)

    infilter = DoubleInPointerFilter(input, False)
    infilter.input_sampling_rate = 48000
    reffilter = DoubleInPointerFilter(reference, False)
    reffilter.input_sampling_rate = 48000
    rls = DoubleBlockLMSFilter(100)
    rls.input_sampling_rate = 48000
    rls.memory = 0.999
    rls.mu = 0.0001
    rls.set_input_port(0, infilter, 0)
    rls.set_input_port(1, reffilter, 0)
    outfilter = DoubleOutPointerFilter(output, False)
    outfilter.input_sampling_rate = 48000
    outfilter.set_input_port(0, rls, 0)
    outfilter.process(input.shape[1])

    return output
def filter(input, reference):
  import numpy as np
  output = np.zeros(input.shape, dtype=np.float64)

  infilter = DoubleInPointerFilter(input, False)
  infilter.input_sampling_rate = 48000
  reffilter = DoubleInPointerFilter(reference, False)
  reffilter.input_sampling_rate = 48000
  rls = DoubleBlockLMSFilter(100)
  rls.input_sampling_rate = 48000
  rls.memory = 0.999
  rls.mu = 0.0001
  rls.set_input_port(0, infilter, 0)
  rls.set_input_port(1, reffilter, 0)
  outfilter = DoubleOutPointerFilter(output, False)
  outfilter.input_sampling_rate = 48000
  outfilter.set_input_port(0, rls, 0)
  outfilter.process(input.shape[1])

  return output
def BlockLMS_set_size_test():
  import numpy as np

  blms = DoubleBlockLMSFilter(100)
  blms.w = np.ones((200,))
def BlockLMS_bad_dim_test():
  import numpy as np

  blms = DoubleBlockLMSFilter(100)
  blms.w = np.array((100,100))
def BlockLMS_get_size_test():
    import numpy as np

    blms = DoubleBlockLMSFilter(100)
    w = blms.w
def BlockLMS_set_size_test():
    import numpy as np

    blms = DoubleBlockLMSFilter(100)
    blms.w = np.ones((200, ))
def BlockLMS_bad_dim_test():
    import numpy as np

    blms = DoubleBlockLMSFilter(100)
    blms.w = np.array((100, 100))