Den 13.06.2010 05:47, skrev David Cournapeau: > > This only works in simple cases. What do you do when you don't know > the output size ?
First: If you don't know, you don't know. Then you're screwed and C is not going to help. Second: If we cannot figure out how much to allocate before starting to use C (very unlikely), we can always use a callback to Python. Or we can have two C functions, the first determining the amount of allocation, the second doing the computation. > How do you deal with reallocation ? That is platform dependent. A buffer object could e.g. have a realloc method. > How do you deal > with ufunc and broadcasting buffering without allocating in the > library ? We allocate whatever we need on the Python side, possibly with a callback to Python if that's what we need. Sturla _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion