Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • $\begingroup$ Since it is Internal I should be able to use in a Compile ? $\endgroup$ Commented Aug 27, 2014 at 10:30
  • $\begingroup$ @lalmei I'm afraid not; to test it we can try something like Compile[{}, Internal`PartitionRagged[Range[10], {5, 5}]][] and it turns out PartitionRagged that is not compilable. $\endgroup$ Commented Aug 27, 2014 at 10:55
  • $\begingroup$ @lalmei The WVM (Wolfram Virtual Machine), which runs the compiled code, can handle only regular arrays. A function that returns a ragged array will cause a runtime error. Usually such functions are called via MainEvaluate, which performs an (uncompiled) evaluation in the "main" (i.e. regular) kernel, but it will still cause an error if the result is ragged array. $\endgroup$ Commented Mar 7, 2015 at 14:42