Skip to main content

Timeline for How to implement Outer with loops

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Jan 21, 2017 at 14:50 comment added jkuczm My answer to "How to implement the general array broadcasting method from NumPy?" question contains "C" implementation of broadcasting, which "overlaps" with Outer.
Jan 19, 2017 at 16:20 answer added LLlAMnYP timeline score: 1
Dec 11, 2016 at 11:58 comment added Simon Woods I'm not clear on the goal here. Are you using Mathematica to prototype an algorithm which you will write in C, or are you after a CompiledFunction in Mathematica which you can use in place of Outer?
Dec 11, 2016 at 10:47 comment added Simon Rochester If you're going for performance in a particular situation, I would suggest amending your question with a simple example problem for benchmarking, and maybe an algorithm to beat. People go ape for questions like that around here...
Dec 11, 2016 at 9:09 comment added TheGuest @Mr.Wizard, while it's true that in most cases vectorization is the way to go in mathematica it's by no means always the case. For example the use of loops in Compile can outperform vectorized operations, esp. when the compilation target is C. Maybe this forum is not quite the right place to ask, but in a C forum people might have a hard time to understand Outer.
Dec 11, 2016 at 9:07 comment added TheGuest @Sascha, I'd like to implement a Outer in C for integer packed arrays.
Dec 11, 2016 at 5:41 comment added Mr.Wizard You can build your Do-loop code using metaprogramming. However one usually wishes to go the other direction in Mathematica, i.e. convert verbose loops into concise high-level abstractions such as Outer, therefore I echo Sascha's question: why? If you explain the purpose behind this question it is likely that you will get more useful replies that if you do not.
Dec 11, 2016 at 2:39 history edited J. M.'s missing motivation
edited tags
Dec 10, 2016 at 23:26 comment added Sascha Why would you like to do this? If this is a quest for better understanding you might want to skip loops altogether and if you are trying to improve performance you ought to look elsewhere since loops are not efficient in Mathematica.
Dec 10, 2016 at 21:23 review First posts
Dec 10, 2016 at 21:41
Dec 10, 2016 at 21:20 history asked TheGuest CC BY-SA 3.0