Skip to content

Commit cb7e55a

Browse files
ShadyBoukharyumar456
authored andcommitted
Added isBool() method to Array
1 parent 826bcfc commit cb7e55a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

com/arrayfire/Array.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public int[] dims() {
145145
return getDims(ref);
146146
}
147147

148-
public ArrayFire.Type type() throws Exception {
148+
public ArrayFire.Type type() {
149149
return ArrayFire.Type.fromInt(getType(ref));
150150
}
151151

@@ -199,6 +199,10 @@ public boolean[] getBooleanArray() throws Exception {
199199
return Data.getBooleanArray(this);
200200
}
201201

202+
public boolean isBool() {
203+
return type() == ArrayFire.Type.Boolean;
204+
}
205+
202206
@Override
203207
public String toString() {
204208
return afToString(ref, "No name");

0 commit comments

Comments
 (0)