python Programming Glossary: sven's
Fast tensor rotation with NumPy http://stackoverflow.com/questions/4962606/fast-tensor-rotation-with-numpy T axes On my system this is around seven times faster than Sven's solution. If the g tensor doesn't change often you can also.. home laptop 500 iterations Your original code 19.471129179 Sven's code 0.718412876129 My first code 0.118047952652 My second code.. on my work machine are Your original code 9.77922987938 Sven's code 0.137110948563 My first code 0.0569641590118 My second..
Discontinuous slice in python list http://stackoverflow.com/questions/5805914/discontinuous-slice-in-python-list 91 92 93 94 95 96 97 98 99 Python 2.7 timing relative to Sven's explicit list comprehension . python m timeit s a range 100.. of 3 4.76 usec per loop Python 3.2 timing also relative to Sven's explicit list comprehension . python m timeit s a range 100..
Finding the user's “My Documents” path http://stackoverflow.com/questions/6227590/finding-the-users-my-documents-path
Different behaviour for list.__iadd__ and list.__add__ http://stackoverflow.com/questions/9766387/different-behaviour-for-list-iadd-and-list-add and failing that calls __add__ followed an assignment see Sven's comment for a minor correction . Since list has __iadd__ then..
|