anchor.diff:  np.save( cls, clusters )
   }*
   
  +deftask evaluate( state1( File ) : cls( File ) ) in python *{
  +
  +import numpy as np
  +
  +clusters = np.load( cls ).item()
  +print( clusters )
  +
  +newmu = []
  +keys = sorted( clusters.keys() )
  +for k in keys:
  +  newmu.append( np.mean( clusters[ k ], axis = 0 ) )
  +
  +state1 = "state1.npy"
  +np.save( state1, newmu )
  +}*
  +
  +deftask has_converged( <conv> : state0( File ) state( File ) ) in python *{
  +
  +import numpy as np
  +
  +oldmu = np.load( state0 )
  +mu    = np.load( state )
  +
  +if set([tuple(a) for a in mu]) == set([tuple(a) for a in oldmu]):
  +  conv = ["true"]
  +else:
  +  conv = []
  +}*
  +
   k = 4;
  -N = 800;
  +N = 40;
   
  -X mu0 = gen_data( N: 800, k: 4 );
  +X   = gen_data( N: N, k: k );
  +mu0 = init_state( data: X, k: k );
   
  -clusters = cluster_points( data: X, state: mu0 );
  +clusters = cluster( data: X, state: mu0 );
  +mu1      = evaluate( cls: clusters );
  +conv     = has_converged( state0: mu0, state: mu1 );
   
  -clusters;+mu1 conv;
positive.code: 
  
  
  deftask gen_data( data( File ) state0( File ) : N k ) in python *{
  
  import numpy as np
  import random
  
negative.code:   X.extend(x)
  X = np.array(X)[:N]
  
  data = "data.npy"
  np.save( data, X )
  }*
  
  deftask init_state( state( File ) : data( File ) k ) in python *{
  
  import numpy as np
  import random
  
  X = np.load( data )
  k = int( k )
  
  mu0 = random.sample( X, k )
  
  state = "state.npy"
  np.save( state, mu0 )
  }*
  
  deftask cluster( cls( File ) : data( File ) state( File ) ) in python *{
  
  import numpy as np
  
  