Timeline for Get the best of two Arrays
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | Community Bot |
Commonmark migration
|
|
| Aug 28, 2017 at 21:24 | comment | added | Jonathan Allan |
No, max just returns the maximum of its two inputs, comparing elements starting at the left. It will fail if it reaches un-orderable elements during the comparisons for example (e.g. in py3 max([1,0,'3'],[1,0,1]) -> Type Error : '>' not supported between instances of 'int' and 'str')
|
|
| Aug 28, 2017 at 21:21 | comment | added | Adalynn | So, basically infinite-base? | |
| Aug 28, 2017 at 21:20 | comment | added | Jonathan Allan |
No need for any convoluted definitions, Python manages - for example max([1,1,0],[1,0,3]) -> [1,1,0] (not [1,1,3]).
|
|
| Aug 28, 2017 at 21:13 | comment | added | Adalynn | What else would it do, take the maximum array in some convoluted way? | |
| Aug 28, 2017 at 20:55 | comment | added | Jonathan Allan |
...and I've been caught out be forgetting that » vectorises before!
|
|
| Aug 28, 2017 at 20:47 | comment | added | Adalynn | Outgolfed!. +1 for the practically verbatim interpretation of the question. | |
| Aug 28, 2017 at 12:36 | history | edited | Jonathan Allan | CC BY-SA 3.0 |
added 225 characters in body
|
| Aug 28, 2017 at 12:27 | history | edited | Jonathan Allan | CC BY-SA 3.0 |
added 295 characters in body
|
| Aug 28, 2017 at 12:19 | history | edited | Jonathan Allan | CC BY-SA 3.0 |
added 295 characters in body
|
| Aug 28, 2017 at 12:11 | history | answered | Jonathan Allan | CC BY-SA 3.0 |