Cython模块不是IPython扩展

时间:2016-11-10 09:33:10

标签: ipython cython jupyter-notebook

尝试从我的Jupiter笔记本加载Cython扩展时

  //Service:
  public class ServiceImplementation: IServiceInterface{
    ProgressBar pgBar = new ProgressBar();

  public void complexFunction(byte[] data_to_send, UInt32 start_addr){
     pgBar.Maximum = data_to_send.Length;
     for(int i = 0; i < data_to_send.Length; i += 64){
      //do some logic
     }
      pgBar.Value = i;
   }
 }

 //Client
  private void btnProgComplexFunction_Click(object sender, EventArgs e){
     callComplexFunction
  }

  void callComplexFunction(){
     ServiceImplementation.ServiceImplementationClient proxyInstance = new 
    ServiceImplementation.ServiceImplementationClient();

    //I attempted doing the following but obviously it doesn't work because progress bar returns an integer (e.g pgBar.Value = 100;). The problem lies here. I have been cracking my skull for two days straight
    pgBar.Value = proxyInstance.complexFunction(data_to_send, start_addr);}

我收到以下消息:

  

Cython模块不是IPython扩展

几周前我没有遇到这个问题,当时我在我的网上写了一个Cython扩展。我试图从我的常规环境(我使用运行10.11的Mac)和Anaconda升级ipython和cython,但没有成功。有什么提示吗?

非常感谢!

1 个答案:

答案 0 :(得分:0)

Cython不是IPython扩展,因此%load_ext不会对它起作用。您仍然可以使用import cython