question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why is `sorted` attribute of Unique an int instead of bool

See original GitHub issue

The operator Unique has an attribute axis of type int, which has only two legal values, 0 or 1. Why wasn’t type bool chosen for this attribute? Is there a notion that more values might be allowed in the future, or is it just for compatibility with another framework?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gramalingamcommented, Jan 20, 2022

The attribute-type system and tensor-element type-system are different in ONNX, and the attribute-type-system is simpler … only one type of integer, one type for floating point in attribute-type-system.

0reactions
ArchRobisoncommented, Jan 21, 2022

Thanks for the explanation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to order a unique list based on 2 object attributes in ...
I have a list of objects I'm referring to as Artifacts. I need to sort alphabetically by the "Name" attribute and in numerical...
Read more >
How to Use sorted() and sort() in Python
Implement basic Python sorting and ordering on data structures; Differentiate between sorted() and .sort(); Customize a complex sort order in your code based...
Read more >
How to use sorted() and sort() in Python 3
A boolean flag that reverses the order of sorting. If True, the sorted list is reversed. The default argument is False.
Read more >
Built-in Types — Python 3.11.1 documentation
The principal built-in types are numerics, sequences, mappings, classes, instances and exceptions. Some collection classes are mutable. The methods that add, ...
Read more >
Boolean Struct (System)
The following example uses this technique to format Boolean values as "Yes" and "No" rather than "True" and "False". C# Copy. Run.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found