Classroom#

class Classroom(clid=None, student_uids=array([], dtype=int64), teacher_uids=array([], dtype=int64), **kwargs)[source]#

Bases: LayerGroup

A class for individual classrooms and methods to operate on each.

Parameters:

kwargs (dict) – data dictionary of the classroom

Attributes

member_uids

students and teachers.

Methods

validate()[source]#

Check that information supplied to make a school is valid and update to the correct type if necessary.

property member_uids#

students and teachers.

Returns:

classroom member ids

Return type:

np.ndarray

Type:

Return ids of all classroom members

member_ages(age_by_uid)[source]#

Return ages of all classroom members: students and teachers.

Parameters:

age_by_uid (np.ndarray) – mapping of age to uid

Returns:

classroom member ages

Return type:

np.ndarray

student_ages(age_by_uid)[source]#

Return student ages in the classroom.

Parameters:

age_by_uid (np.ndarray) – mapping of age to uid

Returns:

student ages in classroom

Return type:

np.ndarray

teacher_ages(age_by_uid)[source]#

Return teacher ages in the classroom.

Parameters:

age_by_uid (np.ndarray) – mapping of age to uid

Returns:

teacher ages in classroom

Return type:

np.ndarray