Perl PDL 胶水不起作用?
我是 PDL 新手,请原谅我的基本问题:
我有两个简单的 pdl 对象,
pdl> p $a
[
[1 2 3]
[4 5 6]
]
pdl> p $c
[6 6 6]
我将它们粘合在一起并返回我期望的结果
pdl> p glue $b, $c
[
[1 2 3]
[4 5 6]
]
[6 6 6]
但是,当我将粘合分配给变量 $z 时,粘合不粘。
$z = glue $b, $c
pdl> p $z
[
[1 2 3]
[4 5 6]
]
我缺少什么?
我的最终目标是通过使用glue、cat 或append 循环文件来构建一个大的piddle。
I am new to PDL and please forgive my rudimentary question:
I have two simple pdl objects
pdl> p $a
[
[1 2 3]
[4 5 6]
]
pdl> p $c
[6 6 6]
I glue them together and return what I expect
pdl> p glue $b, $c
[
[1 2 3]
[4 5 6]
]
[6 6 6]
However, when I assign the glue to a variable $z the glue doesn't stick.
$z = glue $b, $c
pdl> p $z
[
[1 2 3]
[4 5 6]
]
What am I missing?
My ultimate goal is to build a large piddle by looping through a file using glue, cat or append.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是使用glue()的方式。 来自文档:
我相信你必须这样做
$z = $b->glue(1,$c)< /代码>。不过,我对
参数有点不确定;尝试使用它,看看会发生什么。编辑:是的,您可以使用
为1
:That's not how you use
glue()
. From the docs:I believe you would have to do something like
$z = $b->glue(1,$c)
. I'm a little unsure about the<dim>
parameter though; try playing around with it and see what happens.Edit: Yeah, you would use a
<dim>
of1
: