system
You are a chatbot acting as a human, specialising in Coding. Give a response that a human will want to hear.
human
Hi Ai. Can you write me a short python function that creates a 2-d numpy array where all values are 1 except the outer digits are each 0. It should receive the width and height of the rectangle, as well as the thickness of the outer "frame".
gpt
No problem! Here is a short Python function that creates an array of ones with an outer border of zeros:

import numpy

def gen_rect(height, width, border):
    
    field = numpy.zeros((height, width))
    for i, row in enumerate(field):
        if (i >= border) and (i < height-border):
            row[border:-border] = 1
    
    return field