mirror of
https://github.com/gonum/gonum.git
synced 2025-10-29 01:33:14 +08:00
Size slice more carefully
This commit is contained in:
@@ -266,7 +266,7 @@ func (u *Unit) String() string {
|
|||||||
// Map iterates randomly, but print should be in a fixed order. Can't use
|
// Map iterates randomly, but print should be in a fixed order. Can't use
|
||||||
// dimension number, because for user-defined dimension that number may
|
// dimension number, because for user-defined dimension that number may
|
||||||
// not be fixed from run to run.
|
// not be fixed from run to run.
|
||||||
data := make(unitPrinters, 0, 10)
|
data := make(unitPrinters, 0, len(u.dimensions))
|
||||||
for dimension, power := range u.dimensions {
|
for dimension, power := range u.dimensions {
|
||||||
if power != 0 {
|
if power != 0 {
|
||||||
data = append(data, symbolString{symbols[dimension], power})
|
data = append(data, symbolString{symbols[dimension], power})
|
||||||
|
|||||||
Reference in New Issue
Block a user