Skip to content

Commit

Permalink
correct bad docs
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Dec 12, 2023
1 parent ebd21fe commit 19a69a4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/java/io/bioimage/modelrunner/tensor/ImgLib2ToArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ private ImgLib2ToArray()
{
}


/**
* Maps a {@link Tensor} to the provided {@link ByteBuffer} with all the information
* needed to reconstruct the tensor again
* Gets the {@link Tensor} data into a Java flat array of the corresponding
* primitive type with C-ordering
*
* @param <T>
* the type of the tensor
* the type of the {@link Tensor}
* @param tensor
* tensor to be mapped into byte buffer
* @param byteBuffer
* target byte bufer
* @throws IllegalArgumentException
* If the {@link Tensor} ImgLib2 type is not supported.
* {@link Tensor} to be flattened into a Java array
* @return a Java flat array of the corresponding primitive type that contains the data of the {@link RandomAccessibleInterval}
* in C-order
* @throws IllegalArgumentException If the {@link Tensor} type is not supported.
*/
public static < T extends RealType< T > & NativeType< T > > Object build(Tensor<T> tensor)
public static < T extends RealType< T > & NativeType< T > > Object build(Tensor<T> tensor) throws IllegalArgumentException
{
if (tensor.isEmpty())
return new byte[0];
Expand All @@ -83,7 +83,7 @@ public static < T extends RealType< T > & NativeType< T > > Object build(Tensor<
* in C-order
* @throws IllegalArgumentException If the {@link RandomAccessibleInterval} type is not supported.
*/
public static < T extends RealType< T > & NativeType< T > > Object build(RandomAccessibleInterval<T> rai)
public static < T extends RealType< T > & NativeType< T > > Object build(RandomAccessibleInterval<T> rai) throws IllegalArgumentException
{
if (Util.getTypeFromInterval(rai) instanceof ByteType) {
return buildInt8(Cast.unchecked(rai));
Expand Down

0 comments on commit 19a69a4

Please sign in to comment.