Sets the dimensions and values to be the same as the given tensor.
Assumes that the size of the two vectors are equal.
503942
public void set(Tensor other) {
        checkEqualSize(this, other);
        this.dims = IntArrays.copyOf(other.dims);
        DoubleArrays.copy(other.values, this.values);
    }
1110964
@Override
    public void onNDArrayPartial(INDArray arr, long idx, int... dimensions) {
        INDArray get = this.arr.get();
        get.tensorAlongDimension((int) idx, dimensions).assign(arr);

    }
332634
def normalise_tensor(self):
        
        self.tensor, tensor_norm = utils.normalise_tensor(self.tensor)
        return self.tensor / tensor_norm, tensor_norm
536324
void setDimens(int width, int height) {
        mAreDimensOverridden = true;
        mDesiredWidth = width;
        mDesiredHeight = height;
        requestLayout();
    }
931136
public void configure( int width , int height , float vfov ) {
		declareVectors( width, height );

		float r = (float)Math.tan(vfov/2.0f);

		for (int pixelY = 0; pixelY < height; pixelY++) {
			float z = 2*r*pixelY/(height-1) - r;
			for (int pixelX = 0; pixelX < width; pixelX++) {
				float theta = GrlConstants.F_PI2*pixelX/width - GrlConstants.F_PI;
				float x = (float)Math.cos(theta);
				float y = (float)Math.sin(theta);

				vectors[pixelY*width+pixelX].set(x,y,z);
			}
		}
	}
290834
private void fillM( Point2D_F64 x1 , Point2D_F64 x2 , Point2D_F64 x3 ) {
		M.data[0] = x1.x; M.data[1] = x1.y; M.data[2] = 1;
		M.data[3] = x2.x; M.data[4] = x2.y; M.data[5] = 1;
		M.data[6] = x3.x; M.data[7] = x3.y; M.data[8] = 1;
	}
1243132
def tensor_components_to_use(mrr, mtt, mpp, mrt, mrp, mtp):
    '''
    
    '''
    return np.array([[mrr, mrt, mrp], [mrt, mtt, mtp], [mrp, mtp, mpp]])
313164
public static void addEquals(DMatrixD1 a , double beta, DMatrixD1 b )
    {
        if( a.numCols != b.numCols || a.numRows != b.numRows ) {
            throw new MatrixDimensionException("The 'a' and 'b' matrices do not have compatible dimensions");
        }

        final int length = a.getNumElements();

        for( int i = 0; i < length; i++ ) {
            a.plus(i, beta * b.get(i));
        }
    }
784191
public void set(IntFloatSortedVector other) {
        this.used = other.used;
        this.indices = IntArrays.copyOf(other.indices);
        this.values = FloatArrays.copyOf(other.values);
    }
599374
def infer_to_same_shape(self):
        
        results = self.results

        result = self.obj._constructor(data=results)
        result = result.T

        # set the index
        result.index = self.res_index

        # infer dtypes
        result = result.infer_objects()

        return result
640682
public void setDimensions(float llx, float lly, float urx, float ury) {
		this.llx = llx;
		this.lly = lly;
		this.urx = urx;
		this.ury = ury;
	}
172847
def reshape(self, *dims):
        """"""
        shape = _dims2shape(*dims)
        if _volume(shape) != self.size:
            raise ValueError("expected shape with equal volume")
        return self.__class__(self._items, shape, self.ftype)
1267834
def assert_same_rank(self, other):
        
        other = as_shape(other)
        if self.ndims is not None and other.ndims is not None:
            if self.ndims != other.ndims:
                raise ValueError(
                    "Shapes %s and %s must have the same rank" % (self, other)
                )
198415
public void setDimension(double minx, double maxx, double miny, double maxy, double minz, double maxz) {
        this.minx = minx;
        this.maxx = maxx;
        this.miny = miny;
        this.maxy = maxy;
        this.minz = minz;
        this.maxz = maxz;
    }
639963
@Override
	public void setEquirectangularShape( int width , int height ) {
		super.setEquirectangularShape(width, height);
		declareVectors(width, height);

		// precompute vectors for each pixel
		for (int y = 0; y < height; y++) {
			for (int x = 0; x < width; x++) {
				tools.equiToNormFV(x,y,vectors[y*width+x]);
			}
		}
	}
610731
public static DMatrixRMaj[] span(int dimen, int numVectors , Random rand ) {
        if( dimen < numVectors )
            throw new IllegalArgumentException("The number of vectors must be less than or equal to the dimension");

        DMatrixRMaj u[] = new DMatrixRMaj[numVectors];

        u[0] = RandomMatrices_DDRM.rectangle(dimen,1,-1,1,rand);
        NormOps_DDRM.normalizeF(u[0]);

        for( int i = 1; i < numVectors; i++ ) {
//            System.out.println(" i = "+i);
            DMatrixRMaj a = new DMatrixRMaj(dimen,1);
            DMatrixRMaj r=null;

            for( int j = 0; j < i; j++ ) {
//                System.out.println("j = "+j);
                if( j == 0 )
                    r = RandomMatrices_DDRM.rectangle(dimen,1,-1,1,rand);

                // find a vector that is normal to vector j
                // u[i] = (1/2)*(r + Q[j]*r)
                a.set(r);
                VectorVectorMult_DDRM.householder(-2.0,u[j],r,a);
                CommonOps_DDRM.add(r,a,a);
                CommonOps_DDRM.scale(0.5,a);

//                UtilEjml.print(a);

                DMatrixRMaj t = a;
                a = r;
                r = t;

                // normalize it so it doesn't get too small
                double val = NormOps_DDRM.normF(r);
                if( val == 0 || Double.isNaN(val) || Double.isInfinite(val))
                    throw new RuntimeException("Failed sanity check");
                CommonOps_DDRM.divide(r,val);
            }

            u[i] = r;
        }

        return u;
    }
1354877
def reshape_like_all_dims(a, b):
  """"""
  ret = tf.reshape(a, tf.shape(b))
  if not tf.executing_eagerly():
    ret.set_shape(b.get_shape())
  return ret