Ticket #2340 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

CreateWorkspace does not work with arrays extracted straight from another workspace

Reported by: Martyn Gigg Owned by: Michael Whitty
Priority: major Milestone: Iteration 28
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Anders Markvardsen

Description

Jon Taylor has reported:

I have a quick question about create workspace; I have a workspace wksp_in (mari data ) and do the following

spec=1
X=wksp_in.readX(spec)
Y=wksp_in.readY(spec)
E=wksp_in.readE(spec)
CreateWorkspace('out', X, Y, E)

This fails in python with a cannot convert error.

This works if you do

X = list(wksp_in.readX(spec))

etc first

Change History

comment:1 Changed 10 years ago by Nick Draper

  • Milestone changed from Iteration 27 to Iteration 28

Bulk move of tickets at the end of iteration 27

comment:2 Changed 9 years ago by Nick Draper

  • Owner set to Michael Whitty
  • Status changed from new to assigned

comment:3 Changed 9 years ago by Michael Whitty

  • Status changed from assigned to accepted

comment:4 Changed 9 years ago by Michael Whitty

(In [10784]) refs #2340 - syntactic sugar solution for passing numpy array as parameter to an algorithm.

comment:5 Changed 9 years ago by Michael Whitty

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:6 Changed 9 years ago by Martyn Gigg

(In [10950]) Refs #2340. Minor fix for python framework if numpy isn't available (in debug on windows at the moment).

comment:7 Changed 9 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:8 Changed 9 years ago by Anders Markvardsen

  • Status changed from verifying to closed

Looks good. The following script works:

wksp_in = LoadNexus('argus0026287.nxs', 'd').workspace() spec=1 X=wksp_in.readX(spec) Y=wksp_in.readY(spec) E=wksp_in.readE(spec) CreateWorkspace('out', X, Y, E)

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3187

Note: See TracTickets for help on using tickets.