In [21]:
from __future__ import division
import numpy as np

from locore import AntiSparse

In [22]:
n = 10
q = 9
Phi = np.random.randn(q,n)
sp = AntiSparse(Phi)

In [23]:
x = np.ones((n,1))
x[3] = 0.5
x[4] = 0.5
x[5] = 0.5
x[6] = 0.5
x[7:] = -1
plot(x)


Out[23]:
[<matplotlib.lines.Line2D at 0x10658c410>]

In [24]:
sp.ic(x)


Out[24]:
0.3748165390013416