13
votes

In python you can do something like this to let you use a shortened module name:

>>> import tensorflow as tf

From then on you can refer to tf, instead of having to type tensorflow everywhere.

Is something like this possible in Juila?

2

2 Answers

23
votes

Yep, you can just assign the module to a new name.

import JSON
const J = JSON

J.print(Dict("Hello, " => "World!"))

I highly recommend to use the const because otherwise there will be a performance penalty. (With the const, there is no performance penalty.)

4
votes

Julia now supports renaming with as.