396 convert regressors to num power 1#416
Conversation
There was a problem hiding this comment.
Ok Xavier2 Uniform looks good. Did you want to add Xavier2 Normal just to match the Xavier1 Normal you added?
Nice work regarding array_pack, I like the idea of building the optimization into the function itself. It handles the case of a semi-packed array, an edge case, but bound to happen to someone - so this approach solves that.
I'm asking about the need for depth arguments in the comments. Let me know what you think.
Added, you may check. |
|
|
||
| return array_map(function ($item) { | ||
| if (is_array($item)) { | ||
| if (!array_is_list($item)) { |
There was a problem hiding this comment.
It looks like you copied my example, that's perfectly ok, but I didn't spend any time optimizing it. Could this check and pack block here be removed since it will be called first thing when the function recurses?
There was a problem hiding this comment.
Yes, you're right - it's redundant. I removed it.
No description provided.