Giter Site home page Giter Site logo

tarray's People

Contributors

apnadkarni avatar

Stargazers

 avatar

Watchers

 avatar  avatar

tarray's Issues

::tarray::table delete causes a column shift

Hello Ashok,

thank you for this great package! I stumbled upon a bug with the table delete functions.
If you delete the first row of a table with at least one boolean column the columns of the last table row will shift, omitting the values of the boolean column.

Steps to Reproduce

Consider the simple table table with two columns, the first being a boolean column.
Deleting the row with index 0 causes the column shift. Deleting with low and high indexes, eg. 0 and 1 also results in the same problem. If the row gets deleted with an index list, no column shift occurs. Following example demonstrates the problem:

set table [::tarray::table create {
    A boolean B boolean C int
} {
	{0 1 10}
	{0 1 20}
	{0 1 30}
}]

# column shift
set table [::tarray::table delete $table 0]

# column shift
# set table [::tarray::table delete $table 0 1]

# no column shift
# set table [::tarray::table delete $table {0 1}]

set pretty [::tarray::table prettify $table]

Expected Behavior

I expect the content of the variable pretty to look like this:

+--+-+--+
|A|B| C|
+--+-+--+
|0|1|20|
+--+-+--+
|0|1|30|
+--+-+--+

Current Behavior

Currently pretty looks like this:

+--+-+--+
| A|B| C|
+--+-+--+
| 0|1|20|
+--+-+--+
|30| |  |
+--+-+--+

Context (Environment)

I am running tcl 8.6.10 and the package version 1.0.0 on Windows 11.

My C-knowledge is not so great, but I suspect the problem could be in thdr_delete_range and/or thdr_delete_indices. If there is anything else I can help you with, feel free to let me know.

Best regards
Lukas

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.