Comments (3)
If we want to be conservative we could try to detect the data type for each column when the user doesn't specify which format he wants. My suggestion would be:
%d
for integers%.7g
for float32%.18e
for float64
If the user specifies a format we should assume he knows what he is doing and not try to check types.
We can do something similar to numpy.savetxt (http://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.savetxt.html):
fmt
parameter:
single format (%10.5f), a sequence of formats, or a multi-format string, e.g. ‘Iteration %d – %10.5f’, in which case delimiter is ignored.
Except we could set fmt=None
as default and assign our default format depending on the type.
Should we handle complex values ?
But again, I would not have any moral problem if we just assumed that a vast majority users who don't bother defining a custom format would be happy with %.7g
for all values, because it looks nicer and uses less disk space. We would just need to specify in the documentation that the default behavior is not safe for extremely large integers and very precise floats.
from silx.
Yes, that's why I asked the question.
Do we want a conservative default behavior or a simple one?
from silx.
Simple one. If it turns out to be not enough we change. A bit of Extreme Programming should make no harm. If we start from "Cogito ergo sum" we are not going to get very far.
from silx.
Related Issues (20)
- overriding the match ratio in opencl/sift/match.py HOT 1
- h5py_utils fork deprecation warning
- Building `silx` against development version of numpy HOT 2
- `noexcept clause is ignored` warning in Cython code HOT 3
- Add `Tiled` data sources to browse Bluesky runs HOT 8
- Warning in Cython compilation HOT 3
- [2.1.0] Debian build and how to skip ascent downloading ? HOT 4
- How can I copy the data in Raw view? HOT 2
- silx view - HDF5view - improve scroll area HOT 1
- silx.gui.dialog GroupDialog and DatasetDialog are missing an API to select an hdf5 entity
- Add a 'auto' imagej like option HOT 2
- silx view: Large 2D datasets are open HOT 2
- Documentation: Describe conda packaging
- [ExternalResources] Allow to set `_data_home`
- tests failures against Pytest 8.2.0 HOT 4
- Issue with DataViewer when removing views HOT 1
- addCurve advances color index even if color is provided HOT 3
- CI random failure in TestImageFileDialogInteraction.testClickOnBackToParentTool test
- Lineplot window doesn't open on Wayland HOT 1
- [2.1.0] pointer ‘peaks0’ may be used after ‘realloc’ [-Wuse-after-free] HOT 1
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 silx.