Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100757 > unrolled thread
| Started by | Rodrick Brown <rodrick.brown@gmail.com> |
|---|---|
| First post | 2015-12-22 23:14 -0500 |
| Last post | 2015-12-23 22:09 +1100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
convert to python code Rodrick Brown <rodrick.brown@gmail.com> - 2015-12-22 23:14 -0500
Re: convert to python code Steven D'Aprano <steve@pearwood.info> - 2015-12-23 22:09 +1100
| From | Rodrick Brown <rodrick.brown@gmail.com> |
|---|---|
| Date | 2015-12-22 23:14 -0500 |
| Subject | convert to python code |
| Message-ID | <mailman.74.1450844086.2237.python-list@python.org> |
Tried a few things but can't seem to get it right any help ?
let times = (...matrices) =>
matrices.reduce(
([a,b,c], [d,e,f]) => [a*d + b*e, a*e + b*f, b*e + c*f]
);
[toc] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2015-12-23 22:09 +1100 |
| Message-ID | <567a80fe$0$1594$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #100757 |
On Wed, 23 Dec 2015 03:14 pm, Rodrick Brown wrote: > Tried a few things but can't seem to get it right any help ? > > let times = (...matrices) => > > matrices.reduce( > > ([a,b,c], [d,e,f]) => [a*d + b*e, a*e + b*f, b*e + c*f] > > ); Are you expecting us to guess what language this is written in, decipher what it does, and write Python code to do the same thing? How about if you tell us the language and explain what it does? -- Steven
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web