Fix issues with numpy in circuit string evaluation#322
Open
BGerwe wants to merge 1 commit intoECSHackWeek:mainfrom
Open
Fix issues with numpy in circuit string evaluation#322BGerwe wants to merge 1 commit intoECSHackWeek:mainfrom
BGerwe wants to merge 1 commit intoECSHackWeek:mainfrom
Conversation
…bust fix converting numpy array to scalars with .tolist() so element values appear without the type prefix in circtuit string
Pull Request Test Coverage Report for Build 22501956092Details
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My previous attempt at fixing in #298 wasn't sufficient because it relied on an implicit evaluation of
@elementdecorators at import time. This fix converts all scalars to pure Python floats before evaluation, removing any type prefix associated with numpy.This should fix what was originally brought up in #296, and later brought up in #318 and #319. It will supersede what is down in #313 and #317.
Hopefully this lays the issue to rest, and sorry for all the problems and delay in actually addressing this.