go get github.com/gogo/protobuf/proto尽管GOPATH设置了该命令似乎不起作用。
GOPATH="/Users/tmp/Documents/workspace/app/go"
Run Code Online (Sandbox Code Playgroud)
我看到其他软件包也有类似的问题。
读取错误:
package github.com/gogo/protobuf/proto: cannot find package "github.com/gogo/protobuf/proto" in any of:
/usr/local/go/src/github.com/gogo/protobuf/proto (from $GOROOT)
/Users/tmp/Documents/workspace/app/go/src/github.com/gogo/protobuf/proto (from $GOPATH)
Run Code Online (Sandbox Code Playgroud)
跑步go env节目:
GOARCH="amd64"
GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin"
GOPATH="/Users/tmp/Documents/workspace/app/go" GORACE=""
GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
Run Code Online (Sandbox Code Playgroud)
有什么问题,我该如何解决?我在网上没有找到任何东西,但这之前是有效的。
假设你有一个数组:
a =
[ 0,1,0]
[-1,2,1]
[3,-4,2]
并且假设您在所有内容中添加20
b =
[ 20, 21, 20]
[ 19, 22, 21]
[ 23, 16, 22]
现在可以说,我要得到的添加b到原来的数组a,但只有在案件a < 0的指数,即[0,1]与[1,2]在那里a = -1, -4分别获得价值,否则为0.最终导致矩阵如此:
c =
[ 0, 0, 0]
[ 18, 0, 0]
[ 0, 12, 0]
18 = 19 (from b) + -1 (from a)
12 = 16 (from b) + -4 (from a)
并假设我希望能够将其扩展到任何操作(而不仅仅是添加20),这样您就不能只从矩阵中过滤所有值<20 c.所以我想用矩阵a为对矩阵C面膜,归零的i, …