Returns true if this tensor contains any NaNs.
489799
public boolean containsNaN() {
        for (int c = 0; c < this.size(); c++) {
            if (s.isNaN(this.getValue(c))) {
                return true;
            }
        }
        return false;
    }
1360584
def can_compare_pairwise(self):
        
        if self.ndim != 2:
            return False

        return all(dt in DT.ALLOWED_PAIRWISE_TYPES for dt in self.dim_types)
904438
def NS(s, o):
    
    # s,o = filter_nan(s,o)
    return 1 - np.sum((s-o)**2)/np.sum((o-np.mean(o))**2)
680294
def isvector_or_scalar(a):
    
    try:
        return a.size and a.ndim-a.shape.count(1) <= 1
    except:
        return False
9479
def is_float_array(l):
    

    """
    if isinstance(l, np.ndarray):
        if l.dtype.kind == 'f':
            return True
    return False
255344
def has_tensor(obj) -> bool:
    
    if isinstance(obj, torch.Tensor):
        return True
    elif isinstance(obj, dict):
        return any(has_tensor(value) for value in obj.values())
    elif isinstance(obj, (list, tuple)):
        return any(has_tensor(item) for item in obj)
    else:
        return False
1028807
public static boolean hasNaN( ZMatrixD1 m )
    {
        int length = m.getDataLength();

        for( int i = 0; i < length; i++ ) {
            if( Double.isNaN(m.data[i]))
                return true;
        }
        return false;
    }
641504
def is_number(num, if_bool=False):
    

    if isinstance(num, bool):
        return if_bool
    elif isinstance(num, int):
        return True
    try:
        number = float(num)
        return not (isnan(number) or isinf(number))
    except (TypeError, ValueError):
        return False
521307
public static boolean isFloat (@Nullable final String sStr)
  {
    return !Float.isNaN (parseFloat (sStr, Float.NaN));
  }
450053
def is_fully_defined(self):
        """"""
        return self._dims is not None and all(
            dim.value is not None for dim in self._dims
        )
647660
@Pure
	public static double toESRI(float value) {
		return (Float.isInfinite(value) || Float.isNaN(value)) ? ESRI_NAN : value;
	}
445864
public static boolean equalsIncludingNaN(float x, float y) {
        return (Float.isNaN(x) && Float.isNaN(y)) || equals(x, y, 1);
    }
515864
def isfinite(data: mx.nd.NDArray) -> mx.nd.NDArray:
    
    is_data_not_nan = data == data
    is_data_not_infinite = data.abs() != np.inf
    return mx.nd.logical_and(is_data_not_infinite, is_data_not_nan)
943203
def nan_maximum_filter(arr, ksize):
    '''
    
    '''
    out = np.empty_like(arr)
    _calc(arr, out, ksize//2)
    return out
782766
public boolean contains(float x, float y) 
    { 
        float xDelta = x - getCenterX(), yDelta = y - getCenterY();
        return xDelta * xDelta + yDelta * yDelta < getRadius() * getRadius();
    }
295190
public boolean isConstantResponse() {
    double m = Double.NaN;
    for( int b=0; b<_bins.length; b++ ) {
      if( _bins[b] == 0 ) continue;
      if( var(b) > 1e-14 ) return false;
      double mean = mean(b);
      if( mean != m )
        if( Double.isNaN(m) ) m=mean;
        else if(Math.abs(m - mean) > 1e-6) return false;
    }
    return true;
  }
464194
def coordinates_present?(*args)
      args.each do |a|
        # note that Float::NAN != Float::NAN
        # still, this could probably be improved:
        return false if (!a.is_a?(Numeric) or a.to_s == "NaN")
      end
      true
    end