check_consistent_length#

sklearn.utils.check_consistent_length(*arrays)[source]#

check that all arrays have consistent first dimensions.

checks whether all objects in arrays have the same shape or length.

Parameters:
*arrayslist or tuple of input objects.

Objects that will be checked for consistent length.

Examples

>>> from sklearn.utils.validation import check_consistent_length
>>> a = [1, 2, 3]
>>> b = [2, 3, 4]
>>> check_consistent_length(a, b)