Online guidance · Parañaque · Metro Manila

STEAM Miniature Model Crafting and Prototyping in Parañaque

STEAM miniature model crafting and prototyping for Parañaque introduces safe maker materials—foam board, cardboard, gears, LEDs and small motors—so children learn spatial design before or alongside coding.

STEAM Paranaque

1. Introduction: Efficient Array Creation in NumPy

In Python data analysis and machine learning, NumPy provides the core foundation for creating and manipulating arrays and matrices with high performance and efficiency.

In modern development, the industry-wide convention is to import NumPy using the alias np:

import numpy as np

While creating an array directly from custom values is the default approach, scientific computing often demands generating arrays pre-filled with specific default values, ranges, steps, identity matrices, or explicit data types.

  • np.array() — custom elements / explicit dtype
  • np.zeros() — filled with 0s (additive identity)
  • np.ones() — filled with 1s (multiplicative identity)
  • np.full() — filled with any constant custom value
  • np.arange() — evenly spaced values with fixed step
  • np.linspace() — fixed count of equal divisions
  • np.eye() — identity matrix (1s on diagonal)
  • np.diag() — custom diagonal matrix

2. Creating Basic Arrays from Elements (np.array)

The standard method to create a NumPy array is passing a list of values inside square brackets into the np.array() function.

# Creating a 1D array with three elements
arr = np.array([1, 2, 3])
print("1D Array:", arr)

This creates a NumPy array holding one row and three columns with elements 1, 2, and 3.

3. Initializing Constant Arrays: np.zeros, np.ones, and np.full

A. Initializing with Zeros (np.zeros)

To initialize an array of any required dimensions filled entirely with zeros, use np.zeros().

# Creating a 2-row, 3-column matrix filled with zeros
zero_arr = np.zeros((2, 3))
print("Zeros Matrix:\n", zero_arr)
  • The first argument 2 specifies the number of rows; the second argument 3 specifies the number of columns.
  • Every element is initialized to 0.

B. Initializing with Ones (np.ones)

In many linear algebra and data operations—especially multiplication—initializing with zero is impractical because multiplying any number by zero results in zero. For these cases, initialize arrays with ones using np.ones():

# Creating a 2-row, 3-column matrix initialized to 1
ones_arr = np.ones((2, 3))
print("Ones Matrix:\n", ones_arr)

Generates a 2D matrix of shape (2, 3) where every element is initialized to 1.

C. Initializing with a Constant Value (np.full)

To fill an entire array with a specific custom number other than 0 or 1, use np.full(). It takes two arguments: the array shape/size and the initialization value:

# Creating a 2x3 matrix filled entirely with the number 7
full_arr = np.full((2, 3), 7)
print("Full Matrix (Filled with 7):\n", full_arr)

Generates an array with two rows and three columns where all elements are set to 7.

4. Numerical Sequences: np.arange vs. np.linspace

A. Step-Based Ranges (np.arange)

Similar to Python's built-in range(), np.arange() generates values starting from a start point up to an endpoint with a designated step size:

# Range from 0 to 10 with a step size of 2
range_arr = np.arange(0, 10, 2)
print("arange Array:", range_arr)

Output: [0 2 4 6 8]

  • Start included, stop excluded: The sequence starts at 0 and adds +2 repeatedly (0, 2, 4, 6, 8). The stop parameter (10) is not included.

B. Division-Based Intervals (np.linspace)

When you need a range divided into a specific number of equal parts rather than defining a step size, use np.linspace(). NumPy calculates the step size automatically:

# Dividing the interval between 0 and 1 into 5 equal parts
linear_arr = np.linspace(0, 1, 5)
print("linspace Array:", linear_arr)

Output: [0. 0.25 0.5 0.75 1.]

  • Endpoint included: Unlike np.arange(), np.linspace() includes the stop value (1.0) as the final element.

5. Matrix Structures: Identity Matrix and Custom Diagonals

A. Identity Matrix (np.eye)

An identity matrix is a square matrix where all diagonal values equal 1 and all non-diagonal values equal 0. It is generated using np.eye(), which requires only a single dimension argument:

# Creating a 3x3 identity matrix
identity_matrix = np.eye(3)
print("Identity Matrix (3x3):\n", identity_matrix)

Generates a 3×3 matrix with 1s across the main diagonal and 0s everywhere else.

B. Custom Diagonal Matrix (np.diag)

To specify custom values along the diagonal of a square matrix, pass a list of diagonal numbers to np.diag():

# Creating a 3x3 matrix with custom diagonal elements
diag_matrix = np.diag([1, 2, 3])
print("Custom Diagonal Matrix:\n", diag_matrix)

Generates a 3×3 matrix where the diagonal elements are 1, 2, and 3, while all non-diagonal entries are set to 0.

6. Managing Data Types: Enforcing and Converting (dtype & astype)

A. Enforcing Data Types During Creation (dtype)

When creating an array, pass the dtype argument into np.array() to force elements into a specific type, such as floating-point numbers:

# Forcing integer inputs into float representation
float_arr = np.array([1, 2, 3], dtype=float)
print("Float Enforced Array:", float_arr)

Output: [1. 2. 3.] — even though the inputs were integers, dtype=float stores them as floating-point decimals.

B. Converting Types on Existing Arrays (astype)

If an array already exists with decimal values and you need them converted into integers, use the astype() method:

# Array containing floating-point decimals
decimal_arr = np.array([1.5, 2.7, 3.9])

# Converting to integers upon return
int_arr = decimal_arr.astype(int)
print("Converted Integer Array:", int_arr)

Output: [1 2 3] — .astype(int) truncates the fractional portion and keeps only the integer parts.

Lesson Q&A

While np.zeros() initializes every matrix element to 0, multiplying any number by zero yields zero. In workflows involving multiplication, initializing with zeros causes computations to collapse to zero. Initializing with np.ones() assigns every element to 1, preserving values during matrix multiplication and scaling calculations.

1. Step size vs. step count: With np.arange(start, stop, step) you specify the exact step size; with np.linspace(start, stop, num) you specify the total count of equal divisions and NumPy calculates the step. 2. Endpoint inclusion: In np.arange() the stop value is excluded (e.g. np.arange(0, 10, 2) ends at 8). In np.linspace() the stop value is included (e.g. np.linspace(0, 1, 5) includes 1.0).

During creation: use the dtype argument inside np.array() (e.g. np.array([1, 2, 3], dtype=float)) to cast inputs immediately. On an existing array: use the .astype() method (e.g. decimal_arr.astype(int)), which converts stored elements and truncates decimals when casting floats to integers.

What children can learn

WhatsApp +92 322 421 7059

AI and Robotics Club | The 100 Mission AI & Robotics Hero Journey

Recommended self-paced course for parents & educators

Robotics Miniature Modeling for Kids on Udemy.

Disclosure: This page contains affiliate links. We may earn from qualifying purchases at no extra cost to you. Links are intended for parents and educators, not as marketing directed at young children.

Hands and Minds: Physical Models That Teach Engineering Intuition

Parañaque families seeking maker skills benefit from craft that trains spatial reasoning. Adult supervision required for tools and motors. Enquire WhatsApp +92 322 4217059. No invented Parañaque venue or kit prices.

Frequently asked questions

What materials are used in the Parañaque STEAM miniature model crafting workshop?

Students construct physical model prototypes using safe maker materials—including EVA foam chassis, cardboard structures, gear assemblies, LEDs, and small DC motors—to build functional mini-robots and scaled engineering projects.

How does physical craftwork strengthen digital coding skills for kids in Parañaque?

Hands-on model crafting builds 3D spatial intelligence and mechanical intuition. When paired with electronic sensors, kids gain a complete engineering perspective from physical chassis design to software execution.

How do families in Parañaque sign up for an introductory maker craft class?

Send a quick message to our admissions desk on WhatsApp to pick an open weekend session and receive our beginner STEAM project blueprint.

Explore related learning

BGCRobotics · BGC QCArduino · Quezon City MandaluyongmBlock · Mandaluyong