Welcome!

Saving with numpy

I had a problem, for which I needed to google a bit until I've solved it. I had an array of arrays with different datatypes: When I saved it with the numpy.save()  and open it with numpy.load() the datatypes were not the same anymore, all was converted to a string with length 2. arr = [['Peter', 63, True], ['Marie', 52 [...]

List comprehension in Python

Say you have following array: arr = [ ['Anton', 1.73], ['Marie', 1.66], ['Paul', 1.89] ] Now, you want to create an array with all persons that are smaller than 1.80m and you also like to have their height in centimeter. This can be pretty nicely implemented with list comprehension: new_arr = [ [item[0], item[1]*100 [...]

Lyx: How to change the appearance of operators

I struggled a bit with changing the appearance of the operator \Re in Lyx. In Latex one can change its appearance by: \renewcommand{\Re}{\operatorname{Re}} But somehow it just did not work with Lyx. The reason is simple. In Document->Settings->Math Options one can select between "Use AMS Math package automatically" and " [...]