Opened 9 years ago
Closed 9 years ago
#11974 closed defect (fixed)
transformations don't work with a function that returns a singleton numpy array
Reported by: | jason | Owned by: | jason, was |
---|---|---|---|
Priority: | minor | Milestone: | sage-5.1 |
Component: | graphics | Keywords: | sd40.5 |
Cc: | kcrisman | Merged in: | sage-5.1.beta2 |
Authors: | Jason Grout | Reviewers: | Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This patch just casts things to floats when it makes sense. This makes things consistent with plot3d. See http://ask.sagemath.org/question/858/2d-interpolating-function-from-numpy-arrays-to
Attachments (1)
Change History (6)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
- Cc kcrisman added
comment:3 Changed 9 years ago by
- Milestone sage-4.7.3 deleted
comment:4 Changed 9 years ago by
- Keywords sd40.5 added
- Milestone set to sage-5.1
- Reviewers set to Karl-Dieter Crisman
- Status changed from needs_review to positive_review
Amazingly, this even speeds things up.
# old sage: timeit('[h(1,2) for h in T.to_cartesian(operator.mul)]') 625 loops, best of 3: 968 µs per loop # new sage: timeit('[h(1,2) for h in T.to_cartesian(operator.mul)]') 625 loops, best of 3: 939 µs per loop
Good work, sorry it took so long to get to reviewing this.
Annoyingly, all these doctests are not visible in the built docs because the entire class is an underscore!
comment:5 Changed 9 years ago by
- Merged in set to sage-5.1.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Milestone sage-4.7.3 deleted