Skip to content

Commit

Permalink
BF: Remove asarray altogether, not needed for already numeric params
Browse files Browse the repository at this point in the history
  • Loading branch information
TEParsons committed Apr 13, 2021
1 parent cd4e7d0 commit b1a77ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psychopy/experiment/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ def __str__(self):
# will work if it can be represented as a float
return "{}".format(float(self.val))
except Exception: # might be an array
return "asarray(%s, dytpe=float)" % self.val
return "%s" % self.val
elif self.valType == 'int':
try:
return "%i" % self.val # int and float -> str(int)
except TypeError:
return "asarray(%s, dytpe=int)" % self.val # try array of float instead?
return "%s" % self.val # try array of float instead?
elif self.valType in ['extendedStr','str', 'file', 'table', 'color']:
# at least 1 non-escaped '$' anywhere --> code wanted
# return str if code wanted
Expand Down

0 comments on commit b1a77ca

Please sign in to comment.