Comments (4)
I'm somewhat inclined to agree, but clearly somebody wanted it. If it's a problem you can always disable it: http://docs.astropy.org/en/stable/warnings.html
from pyfits.
Indeed I could disable all astropy's UserWarning
's, but at the price of all other rightful warnings.
Is it true that somebody explicitly wanted it, or just used warning.warn
as a standard way to print out confirmation information?
from pyfits.
Yes, that's pretty normal. It's useful for user applications, but for libraries you can just disable them entirely or filter as needed. You can disable specific warnings with a filter: http://docs.python.org/2/library/warnings.html#warning-filter
That said, I'll ask around about it. I found when it was originally added, some nine years ago: 67ac28d#diff-8b4ff7071b289a061e4717473affeb6b
Originally it was just a print statement to stdout so at least that's been fixed ;) I agree that if you've already asked to overwrite existing files maybe you don't need to know about it. Though perhaps one could make a case that it's there so that programs that use PyFITS can use the "clobber" functionality, but the users of those programs don't necessarily know that it will overwrite existing files, so it's informing end-users of that fact...
from pyfits.
I can indeed encapsulate all calls to writeto
in the proper warning management, thanks for the tip (yet not very appealing...). Maybe an alternative would be to define an explicit IOwarning
which could be specifically filtered when needed.
from pyfits.
Related Issues (20)
- Cannot create Column with 'F' format HOT 5
- Mixed Multidimensional Arrays HOT 2
- problem changing random group parameter values HOT 17
- Can't open FITS generated by Maxim-DL HOT 2
- Writing radio interferometric data HOT 3
- pyfits tests fail with numpy 1.10 HOT 1
- pyfits-3.4 breaks pywcs HOT 3
- No code for getting number of extentions HOT 3
- Can't update data in a fits table HOT 4
- Memory leak in compressionmodule.c ? HOT 6
- pyfits tests fail with numpy 1.13 HOT 1
- deprecation of PyFITS - main documentation page HOT 5
- Archive this repository HOT 1
- pyfits install error maximum recursion depth exceeded HOT 3
- Incorrect number of HDU objects if 'SIMPLE' is missing HOT 4
- SyntaxError with Python 3 in pyfits.scripts.fitscheck
- NameError: global name 'sys' is not defined in pyfits/hdu/base.py HOT 7
- gzip (bintable) fits writing is broken HOT 1
- io.fits: strange behaviour of CompImageHDU.header.clear() HOT 2
- boolean mask issue with FITS_rec created using from_columns () HOT 6
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 pyfits.