dtype is copy assignable (#1436)

This commit is contained in:
Awni Hannun
2024-09-25 12:07:13 -07:00
committed by GitHub
parent 195b429d99
commit afc9c0ec1b
7 changed files with 29 additions and 18 deletions

View File

@@ -58,11 +58,11 @@ inline void PrintFormatter::print(std::ostream& os, complex64_t val) {
PrintFormatter global_formatter;
Dtype result_type(const std::vector<array>& arrays) {
std::vector<Dtype> dtypes(1, bool_);
Dtype t = bool_;
for (auto& arr : arrays) {
dtypes.push_back(promote_types(dtypes.back(), arr.dtype()));
t = promote_types(t, arr.dtype());
}
return dtypes.back();
return t;
}
std::vector<int> broadcast_shapes(