Question: How can I make a function in python that read a percolation file and returns an array of 1s and 0s. Functions to read and

How can I make a function in python that read a percolation file and returns an array of 1s and 0s.

Functions to read and write N x N arrays (use numpy) of binary numbers representing a grid of blocked/open sites (from or to text files).

3

0 1 0

1 1 0

0 0 1

would represent a 3x3 system where the first row consists of a blocked site, an open site, and a blocked site.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!