Check weight length.
(self, weight, samples_count)
| 1022 | raise CatBoostError("Invalid weight type={}: must be array like.".format(type(weight))) |
| 1023 | |
| 1024 | def _check_weight_shape(self, weight, samples_count): |
| 1025 | """ |
| 1026 | Check weight length. |
| 1027 | """ |
| 1028 | if len(weight) != samples_count: |
| 1029 | raise CatBoostError("Length of weight={} and length of data={} are different.".format(len(weight), samples_count)) |
| 1030 | if not isinstance(weight[0], (INTEGER_TYPES, FLOAT_TYPES)): |
| 1031 | raise CatBoostError( |
| 1032 | "Invalid weight value type={}: must be 1 dimensional data with elements of an integer or a floating-point type.".format(type(weight[0])) |
| 1033 | ) |
| 1034 | |
| 1035 | def _check_group_id_type(self, group_id): |
| 1036 | """ |
no test coverage detected