Comments (5)
Sorry about that. I'll take a look.
from starlink-pyast.
I've had a quick look and I think I would be inclined to fix the Atl
interface so that it does something like:
try:
import starlink.Grf as Grf
except ImportError:
Grf = None
and then raise an exception in the plotframeset
routine if Grf is None
. Ideally we would have put the ATL plot routines in a different support package but it's a bit late to do that now.
from starlink-pyast.
I suppose that would solve the problem, but it seems less than ideal from an end user's perspective, since it swallows the traceback for the ImportError. If the user thought they had matplotlib installed, this wouldn't give them any feedback as to why import starlink.Grf
is failing.
Why not just put import starlink.Grf
in the plotframeset
function itself? Is this just to conform to PEP8, or is there a more concrete reason to prefer putting this at the top?
Remember, "A foolish consistency is..." not always the best choice. :)
from starlink-pyast.
Hmmm. Yes, I tend to prefer imports at the top of code files rather than buried in the middle, but in this case, given that the failure mode is identical (you get an unexpected error some time after your program starts rather than at import time), I guess having the real error trigger inside plotframeset
is better than an error we make up ourselves when plotframeset
is called.
from starlink-pyast.
Ok, I'm sleep-addled but I've put in an attempted fix in #15.
from starlink-pyast.
Related Issues (10)
- tran() should support ND array input/output HOT 1
- Deprecation warnings with latest astropy version HOT 2
- compilation fails on Fedora 21 HOT 2
- Error pip installing 3.13.1 HOT 2
- Broken docs link. HOT 3
- `astTran` is documented to use `forward` as a keyword argument, but it does not
- Error when using astropy in lieu of pyfits HOT 4
- WCS information for SIP files doesn't survive write/read round trip to FITS file. HOT 31
- norm() cannot be run on the output of tran() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starlink-pyast.