| name | sciris-intro |
| description | Use when the user needs to implement a basic Sciris features — finding array values, plotting with date formatting, objdict containers, saving/loading objects, or parallelization. |
Sciris introduction
Quick reference for Sciris' most commonly used features. See the full tutorial: docs/tutorials/tut_intro.ipynb.
If you need more detail, use your MCP tools (Context7 or GitMCP) to look up current Sciris documentation, or consult the other Sciris skills.
Core Patterns
Array operations
Use the sciris-arrays skill for more details.
import numpy as np
import sciris as sc
data = np.random.rand(50)
inds = sc.findinds(data > 0.9)
mean_str = sc.arraymean(data)
joined = sc.strjoin(inds)
Quick plotting with dates
Use the sciris-dates skill for more details.
dates = sc.daterange('2022-01-01', '2022-02-28', as_date=True)
values = 1e6 * np.random.randn(59)**2
data = sc.dataframe(x=dates, y=values)
plt.scatter(data.x, data.y)
sc.dateformatter()
sc.SIticks()
Flexible containers
Use the sciris-dicts skill for more details.
data = sc.objdict(a=[1,2,3], b=[4,5,6])
assert data.a == data['a'] == data[0]
assert data[:].sum() == 21
for i, key, value in data.enumitems():
print(f'Item {i}: {key} = {value}')
Save/load any object
Use the sciris-files skill for more details.
sc.save('my-sim.obj', sim)
new_sim = sc.load('my-sim.obj')
new_sim.plot()
Parallelization
Use the sciris-parallel skill for more details.
results = sc.parallelize(func, iterkwargs=dict(scale=[40,30,20,10]), x_offset=5, y_offset=10)
Plot configuration
Use the sciris-plotting skill for more details.
sc.options(dpi=120, jupyter=True)
sc.boxoff()