mirror of
https://github.com/gonum/gonum.git
synced 2025-10-07 08:01:20 +08:00
mat: add IsZero method to resetable types
This commit is contained in:
@@ -467,7 +467,7 @@ func (m *Dense) Exp(a Matrix) {
|
||||
}
|
||||
|
||||
var w *Dense
|
||||
if m.isZero() {
|
||||
if m.IsZero() {
|
||||
m.reuseAsZeroed(r, r)
|
||||
w = m
|
||||
} else {
|
||||
@@ -696,7 +696,7 @@ func (m *Dense) Outer(alpha float64, x, y *Vector) {
|
||||
// Panic as a string, not a mat.Error.
|
||||
panic("mat: caps not correctly set")
|
||||
}
|
||||
if m.isZero() {
|
||||
if m.IsZero() {
|
||||
m.mat = blas64.General{
|
||||
Rows: r,
|
||||
Cols: c,
|
||||
|
Reference in New Issue
Block a user