Comments (5)
It is not a bug. april_help can't work with the given table. It needs to know the table name (as string) because the documentation is stored at an auxiliar table which replicates the hierarchy of namespaces and tables of April.
from april-ann.
Anyway, it would be very easy to improve april_help for dealing with tables:
if type(obj) == table then
print("Table ", #table)
for i, v in ipairs(table) do
print(i, v)
end
fi
isn't it? I don't know how determine if it is a pure table (integer indexes) or a dictionary...
from april-ann.
The obvious (and long) solution for that would be to iterate the values of the table and check if every entry is an integer. If some key is not an integer, then the table is a dictionary.
I don't know if there are more efficient solutions for that 🐵
from april-ann.
It is not as easy to deal with tables... the problem is that a table could be a lot of things.
april_help is designed to work with documented objects and structures of April. If you want a ipairs or pairs throught the table, it is simple, do it by yourself ;-) But the ipairs will not show documentation, only methods at the given table.
I mean, what you are asking is a different thing which has nothing to do with april_help. If you want, it is possible to add in "utils.lua" a simple function:
function print_table_pairs OR WHATEVER NAME(t) for i,v in pairs(t) do print(i,v) end
Bests.
from april-ann.
I forgot to explain one more thing. april_help leads with tables actually. But for other purposes. Look this example:
thenet = ann.components.stack()
april_help(thenet)
This piece of code shows the documentation associated with ann.components.stack
. It is not the same as a pairs or ipairs, because the object has inheritance, and april_help goes through internal structure of April C++/Lua classes.
from april-ann.
Related Issues (20)
- package.lua is missing in ocr.off_line_text_preprocessing HOT 1
- Coding style guide HOT 1
- Homebrew release compilation histroy library not found HOT 1
- Compilation issues with devel branch HOT 1
- Const arguments in interest_points and other similar packages
- Travis CI, Homebrew and shared library
- Matrix as subclasses of TokenBase and dynamic lua_push* in binding HOT 5
- Auto-complete problem HOT 1
- collaborate/incorporate/interoperate/merge with torch? HOT 3
- Updated function `leer_int_params` to throw errors in case of not table given HOT 1
- Add ee5_base64 library to `package.preload` table HOT 1
- String parser for CNNs construction
- Silent error in dataset.union
- Add a version and creation field on NN objects HOT 7
- Using train.lua with silence switches and --initial_hmm complains for missing --num-states switch
- Avoid multiple allocation when pushing same C++ object into Lua HOT 2
- Review prelu constructor HOT 1
- OMP + fork hanging up child process
- Smart pointers, Lua calls and protected calls
- build error HOT 2
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 april-ann.