mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Fix complex power and print (#2286)
* fix complex power and print * fix complex matmul shape
This commit is contained in:
@@ -69,7 +69,12 @@ inline void PrintFormatter::print(std::ostream& os, double val) {
|
||||
os << val;
|
||||
}
|
||||
inline void PrintFormatter::print(std::ostream& os, complex64_t val) {
|
||||
os << val;
|
||||
os << val.real();
|
||||
if (val.imag() >= 0 || std::isnan(val.imag())) {
|
||||
os << "+" << val.imag() << "j";
|
||||
} else {
|
||||
os << "-" << -val.imag() << "j";
|
||||
}
|
||||
}
|
||||
|
||||
PrintFormatter& get_global_formatter() {
|
||||
|
||||
Reference in New Issue
Block a user