File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
java/org/tensorics/core/tensor/lang
test/org/tensorics/core/tensor Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -170,10 +170,7 @@ public static final <S> OngoingTensorFiltering<S> filter(Tensor<S> tensor) {
170170
171171 public static final <S > Tensor <S > completeWith (Tensor <S > tensor , Tensor <S > second ) {
172172 checkNotNull (second , "second tensor must not be null" );
173- checkArgument (second .shape ().dimensionSet ().equals (tensor .shape ().dimensionSet ()),
174- "Tensors do not have the same dimensions! Completion not supported! Dimensions of tensor to complete: "
175- + tensor .shape ().dimensionSet () + "; Dimensions of tensor for completion: "
176- + second .shape ().dimensionSet ());
173+
177174 Builder <S > builder = ImmutableTensor .builder (tensor .shape ().dimensionSet ());
178175 builder .context (tensor .context ());
179176
Original file line number Diff line number Diff line change @@ -91,10 +91,15 @@ public void canAddTensorsWithEqualDimensionsAndIncompatibleLeafCoordinates() {
9191 }
9292
9393 @ Test
94- public void canCompleteTensorsWithCompatibleDimensionsAndIncompatibleLeafCoordinates () {
94+ public void canCompleteTensorsWithEqualDimensionsAndIncompatibleLeafCoordinates () {
9595 Tensorics .complete (compatibleInterfaceTensor ).with (incompatibleInterfaceTensor );
9696 }
9797
98+ @ Test
99+ public void canCompleteTensorsWithCompatibleDimensionsAndIncompatibleLeafCoordinates () {
100+ Tensorics .complete (compatibleInterfaceTensor ).with (incompatibleLeafTensor );
101+ }
102+
98103 @ Test
99104 public void canAddTensorsWithEqualDimensionsAndPartiallyIncompatibleLeafCoordinates () {
100105 Tensor <Double > mixedInterfaceTensor = Tensorics .complete (compatibleInterfaceTensor )
You can’t perform that action at this time.
0 commit comments