Code Monkey home page Code Monkey logo

Comments (1)

kahaaga avatar kahaaga commented on September 26, 2024

By modifying the DimensionalData.jl printing code, I'm getting close to something here.

julia> Counts([50, 44, 33], ["cake", "meat", "veggie"])
 Counts{Int64,1} over 3 outcomes
 "cake"    50
 "meat"    44
 "veggie"  33
 
julia> Counts(rand(1:3, 5, 2))
 5×2 Counts{Int64,2}
                          Outcome(1)  Outcome(2)
 Outcome(1)                        3           1
 Outcome(2)                        3           1
 Outcome(3)                        3           1
 Outcome(4)                        1           1
 Outcome(5)                        3           3
 
julia> Counts(rand(1:10, 4), ["o1", "o2", 56, 2])
 Counts{Int64,1} over 4 outcomes
   "o1"   5
   "o2"   5
 56       8
  2      10
  
julia> c = Counts(rand(1:30, 2, 3, 3), (['a', 'e'], 2:2:6, [(1, 2), (2, 1), (3, 1)]))
 2×3×3 Counts{Int64,3}
[:, :, 1]
                 2   4   6
 'a'            15  18  27
 'e'            23  13  17
[and 2 more slices...]

I just need to get rid of the extra spaces that sometimes occur, and I think this is good to go.

from complexitymeasures.jl.

Related Issues (20)

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.