Returns True if categorical arrays are equal.

        Parameters
        ----------
        other : `Categorical`

        Returns
        -------
        bool
766696
def equals(self, other):
        
        if self.is_dtype_equal(other):
            if self.categories.equals(other.categories):
                # fastpath to avoid re-coding
                other_codes = other._codes
            else:
                other_codes = _recode_for_categories(other.codes,
                                                     other.categories,
                                                     self.categories)
            return np.array_equal(self._codes, other_codes)
        return False
955734
def _valid_other_type(x, types):
    
    return all(any(isinstance(el, t) for t in types) for el in np.ravel(x))
758293
def identical(self, other):
        
        try:
            return (utils.dict_equiv(self.attrs, other.attrs) and
                    self.equals(other))
        except (TypeError, AttributeError):
            return False
1057042
def column_types_equal(a_coltype: TypeEngine, b_coltype: TypeEngine) -> bool:
      # noqa
    return str(a_coltype) == str(b_coltype)
160445
def is_categorical_astype(self, dtype):
        
        if dtype is Categorical or dtype is CategoricalDtype:
            # this is a pd.Categorical, but is not
            # a valid type for astypeing
            raise TypeError("invalid type {0} for astype".format(dtype))

        elif is_categorical_dtype(dtype):
            return True

        return False
1282287
public boolean sameAs(Frame<ValueType> other) {
        if (isTop != other.isTop) {
            return false;
        }

        if (isTop && other.isTop) {
            return true;
        }

        if (isBottom != other.isBottom) {
            return false;
        }

        if (isBottom && other.isBottom) {
            return true;
        }

        if (getNumSlots() != other.getNumSlots()) {
            return false;
        }

        for (int i = 0; i < getNumSlots(); ++i) {
            if (!getValue(i).equals(other.getValue(i))) {
                return false;
            }
        }

        return true;
    }
614557
def is_equal(self, other):
        
        other = self.coerce(other)
        return len(self.get_values().symmetric_difference(other.get_values())) == 0
1328498
def equals(self, other):
        
        if self.is_(other):
            return True

        if not isinstance(other, ABCIndexClass):
            return False
        elif not isinstance(other, type(self)):
            try:
                other = type(self)(other)
            except Exception:
                return False

        if not is_dtype_equal(self.dtype, other.dtype):
            # have different timezone
            return False

        elif is_period_dtype(self):
            if not is_period_dtype(other):
                return False
            if self.freq != other.freq:
                return False

        return np.array_equal(self.asi8, other.asi8)
712820
public boolean hasSameData(ZFrame other)
    {
        if (other == null) {
            return false;
        }

        if (size() == other.size()) {
            return Arrays.equals(data, other.data);
        }
        return false;
    }
1208063
public static boolean haveEqualArrays(int[] arra, int[] arrb, int count) {

        if (count > arra.length || count > arrb.length) {
            return false;
        }

        for (int j = 0; j < count; j++) {
            if (arra[j] != arrb[j]) {
                return false;
            }
        }

        return true;
    }
983392
def difference(self, *others):
        
        if all([isinstance(a, self.__class__) for a in others]):
            return self.client.sdiff([self.name] + [other.name for other in others])
        else:
            othersets = filter(lambda x: isinstance(x, set), others)
            otherTypes = filter(lambda x: isinstance(x, self.__class__), others)
            return self.client.sdiff([self.name] + [other.name for other in otherTypes]).difference(*othersets)
280916
def equals(self, other):
        """"""
        if isinstance(other, SSAEvent):
            return self.as_dict() == other.as_dict()
        else:
            raise TypeError("Cannot compare to non-SSAEvent object")
474293
def is_array(self, data_type):
    '''
    '''

    # Split off any brackets
    data_type = data_type.split('[')[0].strip()

    return data_type.lower() in self.array_types
1021061
public static boolean areEqual(byte[] array1, byte[] array2) {
		if (array1.length != array2.length) return false;

		for (int i=0; i<array1.length; ++i)
			if (array1[i] != array2[i]) return false;

		return true;
	}
729530
function isEqual (array1, array2) {
    return array1.length === array2.length && array1.every(function (element, index) {
      return element === array2[index];
    });
  }
1285768
def is_equal(self, other):
        
        other = IntervalCell.coerce(other)
        return other.low == self.low and other.high == self.high
1249863
def equal(self, other, delta=0.0):
        
        if (other is None):
            return False
        if (self.uri != other.uri):
            return(False)
        if (self.timestamp is not None or other.timestamp is not None):
            # not equal if only one timestamp specified
            if (self.timestamp is None or
                    other.timestamp is None or
                    abs(self.timestamp - other.timestamp) >= delta):
                return(False)
        if ((self.md5 is not None and other.md5 is not None) and
                self.md5 != other.md5):
            return(False)
        if ((self.length is not None and other.length is not None) and
                self.length != other.length):
            return(False)
        return(True)