Code Monkey home page Code Monkey logo

Comments (4)

nophead avatar nophead commented on June 28, 2024 1

The evolved version of my utility, which I think this is based on, has a fix for negative 0. https://github.com/nophead/NopSCADlib/blob/master/scripts/c14n_stl.py#L35

from stlsort.

hroncok avatar hroncok commented on June 28, 2024

Hey Roman. Thanks for the report. stlsort currently:

  1. converts the values to Python floats but preserves the original values
  2. sorts the data using the float values
  3. outputs the original values

This means that if the original file has 1, it will still have 1, while if the original file has 1.000 or 1e0, that literal value will be used.

I think that converting -0 to 0 but preserving all other values is not very systematic.

stsort could convert the values to a canonical form, but it would need to be well-defined and optional (e.g. via a command line switch), to preserve backwards compatibility.

I can definitively review such addition, but I won't be implementing it myself. The current functionality of stlsort works nicely for my needs.

from stlsort.

hroncok avatar hroncok commented on June 28, 2024

You are correct, this is based on your utility.

from stlsort.

roman-dvorak avatar roman-dvorak commented on June 28, 2024

Thanks for the summary and brief description of the function. I'll try to use the tool from @nophead (NopSCADlib) and if that's not enough, I'll try to create some argument to stlsort. (Or do you want this feature in STLSORT?)

I will close the issue when I find a solution to this problem.

from stlsort.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.