Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wolfram mathematica Mathematica中展平的逆?_Wolfram Mathematica - Fatal编程技术网

Wolfram mathematica Mathematica中展平的逆?

Wolfram mathematica Mathematica中展平的逆?,wolfram-mathematica,Wolfram Mathematica,f[x_3;]的倒数是什么:=展平[x],其中x是具有尺寸DIM的数组?您可能需要分区[]或其相关项。没有内置函数,但将和组合在一起非常容易: In[47]:= x1 = RandomReal[{0, 1}, {3, 4, 5}]; In[48]:= dims = Dimensions[x1] Out[48]= {3, 4, 5} In[49]:= x2 = Fold[Partition, Flatten[x1], Most[Reverse[dims]]]; In[50]:= x1 ==

f[x_3;]的倒数是什么:=展平[x],其中x是具有尺寸DIM的数组?

您可能需要分区[]或其相关项。

没有内置函数,但将和组合在一起非常容易:

In[47]:= x1 = RandomReal[{0, 1}, {3, 4, 5}];

In[48]:= dims = Dimensions[x1]

Out[48]= {3, 4, 5}

In[49]:= x2 = Fold[Partition, Flatten[x1], Most[Reverse[dims]]];

In[50]:= x1 == x2

Out[50]= True