1 Star 4 Fork 11

王布衣 / pandas

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pow.go 265 Bytes
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 2023-02-25 01:57 . !74#I6HES3实现numpy.dot函数
package stat
import (
"math"
)
func Pow[T Number](v []T, n int) []T {
x := make([]T, len(v))
for i := 0; i < len(v); i++ {
x[i] = __pow_go(v[i], n)
}
return x
}
func __pow_go[T Number](x T, n int) T {
y := math.Pow(float64(x), float64(n))
return T(y)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/quant1x/pandas.git
git@gitee.com:quant1x/pandas.git
quant1x
pandas
pandas
v0.9.26

搜索帮助

344bd9b3 5694891 D2dac590 5694891