isEmpty property
Returns true
if the last dimension is empty or if it only contains
null
s.
Implementation
@override
bool get isEmpty {
List<NdArray> lastDimension = extractDimension(numDimensions);
for (NdArray ndArray in lastDimension) {
if (ndArray.data.isNotEmpty) {
for (dynamic element in ndArray.data) {
if (element != null) return false;
}
}
}
return true;
}