code: function (D) {
  			var N = D.length;
  			assert(N > 0, " X is empty? You must have some data!");
  			// convert D to a (fast) typed array version
  			var dists = zeros(N * N); // allocate contiguous array
  			for (var i = 0; i < N; i++) {
  				for (var j = i + 1; j < N; j++) {
  					var d = D[i][j];
  					dists[i * N + j] = d;
  					dists[j * N + i] = d;
  				}
  			}
  			this.P = d2p(dists, this.perplexity, 1e-4);
  			this.N = N;
  			this.initSolution(); // refresh this
  		}
docs: this function takes a given distance matrix and creates matrix P from them. D is assumed to be provided as a list of lists, and should be symmetric