enthought

How to install CVXOPT with Enthought python (Canopy)

a 夏天 提交于 2020-01-01 12:06:27
问题 Before I start, let me put alternative titles for this post: How to compile CVXOPT with Intel MKL ? How to change __init__.py in CVXOPT to compile with Intel MKL ? Let me explain the issue. I am trying to install pystruct with Enthought python because Enthought python provides significant speed up in comparison to python in the Ubuntu package manager. The speed-up are mostly due to compiling back-end linear algebra libraries with Intel MKL libraries. I have to say that CVXOPT and pystruc

Any way to solve a system of coupled differential equations in python?

我只是一个虾纸丫 提交于 2019-12-30 03:49:08
问题 I've been working with sympy and scipy, but can't find or figure out how to solve a system of coupled differential equations (non-linear, first-order). So is there any way to solve coupled differential equations? The equations are of the form: V11'(s) = -12*v12(s)**2 v22'(s) = 12*v12(s)**2 v12'(s) = 6*v11(s)*v12(s) - 6*v12(s)*v22(s) - 36*v12(s) with initial conditions for v11(s), v22(s), v12(s). 回答1: For the numerical solution of ODEs with scipy, see scipy.integrate.solve_ivp, scipy.integrate

Enthought Canopy Mayavi font size bug

Deadly 提交于 2019-12-29 08:43:07
问题 The font size setting in Enthough Canopy Mayavi mlab appears to be broken. Neither the command: mlab.axes.label_text_property.font_size = 12 (e.g.) nor the direct menu font size command (advanced settings) works. I have logged a bug report with Enthought, but it looks like a more general Mayavi bug, see Does Mayavi "Font Size" text property work? 回答1: As you say this is a bug that has to do with the translation between the mayavi layer and the vtk layer. But for now you could use this

compiling cython modules when gcc is on the PATH in OSX

送分小仙女□ 提交于 2019-12-25 09:59:11
问题 I'm trying to use distutils to compile a cython module using Enthought Canopy's version of python; however it's clear there is a mixup between gcc and clang. Distutils is trying to compile the module using gcc and the clang option -arch x86_64 . The problem is that I have gcc installed from macports, so gcc isn't just a link to clang. I can get the module to compile using CC='clang' ./setup.py build_ext , but this feels a little hacky in terms of distributing the module. Is there something I

compiling cython modules when gcc is on the PATH in OSX

孤人 提交于 2019-12-25 09:58:29
问题 I'm trying to use distutils to compile a cython module using Enthought Canopy's version of python; however it's clear there is a mixup between gcc and clang. Distutils is trying to compile the module using gcc and the clang option -arch x86_64 . The problem is that I have gcc installed from macports, so gcc isn't just a link to clang. I can get the module to compile using CC='clang' ./setup.py build_ext , but this feels a little hacky in terms of distributing the module. Is there something I

Using ipcluster to connect to an OS X server w/ EPD from Linux?

家住魔仙堡 提交于 2019-12-24 16:23:07
问题 I am trying to use IPython.parallel's support for SSH to allow my Linux client to run remote ipengine s from an OS X server that has EPD64 installed. This fails, however, as it attempts to use my local machine to figure out the right command to run on the remote host, which has its ipengineapp package in a different location. How do I modify ipcluster_config.py to recognize the difference? Concretely, when I run ipcluster start --log-level=DEBUG on the remote host, I get console output

listen for ctf otf changes with traits in mayavi volume rendering

回眸只為那壹抹淺笑 提交于 2019-12-24 16:15:09
问题 I would like to listen to changes in the transfer function in how the color and opacity (ctf/otf) of my data is represented. Listening to sensible-sounding traits such as mayavi.modules.volume.Volume._ctf does not trigger my callback. I would expect this to be changed by the user either through the "standard" mayavi pipeline display (as part of EngineRichView) or through including the Volume object's view directly. No such luck either way. It is maybe telling that when you press the big red

Reading 1000s of XML documents with BeautifulSoup

流过昼夜 提交于 2019-12-23 05:45:10
问题 I'm trying to read a bunch of xml files and do stuff to them. The first thing I want to do is rename them based on a number that's inside the file. You can see a sample of the data here Warning this will initiate a download of a 108MB zip file! . That's a huge xml file with thousands of smaller xml files inside it. I've broken those out into individual files. I want to rename the files based on a number inside (part of preprocessing). I have the following code: from __future__ import print

Plotting 2D in Python

核能气质少年 提交于 2019-12-23 04:47:39
问题 I am trying to line plot a function, but I am getting an error. How can I do this? I am using Enthought Canopy. In[35] : plt.plot(np.arange(0, nx, 1), Iftarray[:, ny/2]) Out[35]: [<matplotlib.lines.Line2D at 0x8332dd8>] 回答1: Like Sam says in the comment: There is no error here; try: plt.show() You'll be surprised :) 回答2: As the others said, the output text that you see is expected, not an error. However this information, while useful, does not address the question of why you are not seeing

How can I get FEniCS working in Ubuntu 12.04 with EPD python?

◇◆丶佛笑我妖孽 提交于 2019-12-23 01:59:09
问题 FEniCS that comes in the Ubuntu 12.04 repository does not work with Enthought EPD unless I do some crazy stuff with PYTHONPATH which can often result in EPD using Ubuntu repository python modules rather than EPD modules. The alternative then is to compile and install all of the FEniCS modules manually. This is screwy because FEniCS needs sudo to install in the normal EPD directory, /usr/local/EPD. If you use sudo, this means that PATH environment variable is not being sourced from ~/.bashrc