Re: numpy indexing performance

2017-03-21 Thread Olaf Dietrich
Olaf Dietrich : > This is a simplified example of a Monte Carlo > simulation where random vectors (here 2D vectors, > which are all zero) are summed (the result is in > r1 and r2 or r, respectively): > > def case1(): > import numpy as np > M = 10 > N =

numpy indexing performance

2017-03-15 Thread Olaf Dietrich
This is a simplified example of a Monte Carlo simulation where random vectors (here 2D vectors, which are all zero) are summed (the result is in r1 and r2 or r, respectively): def case1(): import numpy as np M = 10 N = 1 r1 = np.zeros(M) r2 = np.zeros(M) s1 = np.zer

Re: Tkinter: how to create (modal) dialogs a la tk_dialog?

2010-10-28 Thread Olaf Dietrich
Peter Otten <__pete...@web.de>: > Olaf Dietrich wrote: > >> I'm stuck with a probably simple task: How can I create >> a user defined dialog (similar to tkFileDialog.askdirectory(), >> but with my own set of options/selections)? > > Have a look at the S

Tkinter: how to create (modal) dialogs a la tk_dialog?

2010-10-27 Thread Olaf Dietrich
I'm stuck with a probably simple task: How can I create a user defined dialog (similar to tkFileDialog.askdirectory(), but with my own set of options/selections)? In Tk, that's set reply [tk_dialog .foo "The Title" "Which one?" {} 0 \ Yes No "I'm not sure"] What would be the equ

Re: Tkinter: Exception RuntimeError: 'maximum recursion depth exceeded'

2010-10-13 Thread Olaf Dietrich
Lawrence D'Oliveiro : > In message , Olaf Dietrich wrote: > >> If I replace update() by update_idletasks(), the problem >> disappears, but unfortunately, considerably fewer events >> are recorded on the canvas (when connecting the pixels with >> lines

Re: Tkinter: Exception RuntimeError: 'maximum recursion depth exceeded'

2010-10-13 Thread Olaf Dietrich
Jeff Hobbs : > On Oct 12, 9:43 am, o...@dtrx.de (Olaf Dietrich) wrote: >> >> After some somewhat heavy mouse action inside the >> canvas (with the left button pressed), the application throws: >> >> | Exception RuntimeError: 'maximum recursion depth excee

Tkinter: Exception RuntimeError: 'maximum recursion depth exceeded'

2010-10-12 Thread Olaf Dietrich
I have the following (now extremely minimalistic) Tkinter application: --- START #! /usr/bin/python2.6 import sys import Tkinter import numpy from PIL import Image, ImageTk class Viewer(object): def __init__(self, tk_root): '