Menu

Completion on variables

Anonymous
2010-05-04
2013-03-15
  • Anonymous

    Anonymous - 2010-05-04

    For starters, I am using Pydev with the latest version of Eclipse and Enthought EPD32-6.1 (Academic version).  I am having problems completing on variables. Consider this example code:

    import numpy as np
    x = np.arange(10)

    The editor will provide completion for "np.", but when I try to complete on "x." only the default methods appear (__class__, __doc__, etc) instead of all of the numpy array methods. This also happens for matplotlib classes.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-05-18

    The problem is that Pydev can't tell the return of a function (in this case np.arange) when using the dynamic analyzer (because it won't really execute that code to get the return). The static analyzer (that uses source code) could do it, but as numpy is compiled it cannot get it…

    An option would be creating pre-defined completions for numpy, as explained at http://pydev.org/manual_101_interpreter.html, but I'm not sure what would it take to extract the needed info from numpy.

    Cheers,

    Fabio

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.