Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ParaView ParaView
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,846
    • Issues 1,846
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 87
    • Merge requests 87
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ParaView
  • ParaViewParaView
  • Issues
  • #21121
Closed
Open
Created Dec 04, 2021 by Bob Weigel@rweigel

All numpy methods put in local namespace of Macro

In the following code, pvs.Show() leads to the equivalent of from numpy import * being executed on the same line.

As a result, my variable source is redefined to be the function numpy.source.

import paraview.simple as pvs

source = pvs.ProgrammableSource()
source.Script = "import numpy as np"

print(len(locals())) # 9
print(source) # <paraview.servermanager.ProgrammableSource object at 0x128d238b0>
pvs.Show(source)
print(source) # <function source at 0x12848e550>
print(len(locals())) # 638
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking