3 ms·
GUI libraries use a socket connection to the X server, which is a global object; they also use a message loop, which is again global. Libraries like glibc to s
by jnxx 5y ago
GUI libraries use a socket connection to the X server, which is a global object; they also use a message loop, which is again global.
Libraries like glibc to some degreee manage parts of the runtime environment. It would likely cause difficulties if you tried to use different versions of it in the same program.
They main thing numpy provides is a general multi-array data structure. This structure is used to exchange data between many different libraries and software components. If components would use different instances of numpy, it would be required that they still use the exact same data layout for the array data structure. In addition, while in C it is possible to link a library statically, or to load a dynamic library with different versions, using dlopen(), in Python there are no provisions for that, and a large part of numpy is implemented as a C extension module. But this difficulty is in theory possible to overcome; what you could not work around are differences in the data structure layout.