Skip to content

Commit

Permalink
Corrected wrong generic types
Browse files Browse the repository at this point in the history
  • Loading branch information
kaifox committed Feb 23, 2017
1 parent ff77fd3 commit 801f9e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private TensorbackedInternals() {
* @return the set of dimentions (classses of coordinates) which are required to create an instance of the given
* class.
*/
public static <T extends Tensorbacked<V>, V> Set<Class<?>> dimensionsOf(Class<T> tensorBackedClass) {
public static Set<Class<?>> dimensionsOf(Class<? extends Tensorbacked<?>> tensorBackedClass) {
Dimensions dimensionAnnotation = tensorBackedClass.getAnnotation(Dimensions.class);
if (dimensionAnnotation == null) {
throw new IllegalArgumentException(
Expand All @@ -81,7 +81,7 @@ public static <V, T extends Tensorbacked<V>> T createBackedByTensor(Class<T> ten
static <T extends Tensorbacked<V>, V> void verifyDimensions(Class<T> tensorBackedClass, Tensor<V> tensor) {
Set<Class<?>> targetDimensions = dimensionsOf(tensorBackedClass);
Set<Class<?>> tensorDimensions = tensor.shape().dimensionSet();

if (!Positions.areDimensionsConsistent(targetDimensions, tensorDimensions)) {
throw new IllegalArgumentException("Dimensions of target class (" + targetDimensions
+ ") do not match dimensions of given tensor (" + tensorDimensions + "). Cannot create object.");
Expand Down

0 comments on commit 801f9e3

Please sign in to comment.