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.

Make namespace flat

See original GitHub issue

Plan is to have a flat namespace for public functions:

  • plot_ (plot_forest, plot_autocorrelation, etc)
  • stat_ (not wild about this naming convention - maybe just make sure these names are descriptive and exposed in the top-level namespace. thoughts?)
  • other functions (convert_to_xarray, style.use)
  • Rename load_arviz_data to load_dataset
  • Make sure libraries like matplotlib.pyplot or xarray are not making it into the arviz namespace.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
ColCarrollcommented, Sep 7, 2018

My only hesitation with that is that there will be different return types (turning a numpy array into inference data is a ton of guessing about intentions). What about exposing

to_inference_data
to_dataset
from_pymc3
from_stan

in the top level, and rename the directory to convert, so you can az.convert.dict_to_dataset or az.convert.numpy_to_dataarray if you need extra specificity.

I know it is not consistent, but I sort of like that from_pymc3 accepts a trace argument, while from_stan accepts a fit object, which will be familiar to users of the library. Hopefully from_pyro and from_tfp will show up soon!

0reactions
ColCarrollcommented, Sep 20, 2018

Marking this as done, by the way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use a "flat" namespace in whole C# project
Although all concerns mentioned in comments, there's simple way to achieve this. Just go to project properties and define default namespace:.
Read more >
Introducing Hierarchical Namespaces - Kubernetes
Namespaces for tenancy​​ Namespaces have two key properties that make them ideal for policy enforcement. Firstly, they can be used to represent ...
Read more >
Understanding Object Storage Namespaces
Within a namespace, buckets and objects exist in flat hierarchy, but you can simulate a directory structure to help navigate a large set...
Read more >
File scoped namespaces - C# 10.0 draft specifications
This feature specification describes file scoped namespaces, where the entire contents of a file are included in a namespace declared at the ...
Read more >
Packaging namespace packages
Namespace packages allow you to split the sub-packages and modules within a single ... All that is required to create a native namespace...
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