Question: I have two big numpy arrays, I need to divide them.

Since I am working on Python 32-bits, and the arrays are too big, to avoid `FloatingPointError`, I am doing, for example:

```
x = numpy.array([...],dtype=object)
y = numpy.array([...].dtype=object)

```

The problem is that, inside the array `y`, some elements can be 0.0

So, my question, how to handle the calculation `x/y` and avoid `ZeroDivisionError`.

For exmaple, I would like to force `nan` if the element in `y` is 0. So that, for that particular element inside the array, the calculation `x/y=nan`

Answer: 
I also follow the way to have user as owner, and user is member of `www-data`.

My sequence of command is a bit different:

```
cd /var/www/html/laravel-project-root 
sudo chown -R $USER:www-data .

sudo find . -type f -exec chmod 664 {} \;   
sudo find . -type d -exec chmod 775 {} \;

sudo find . -type d -exec chmod g+s {} \;  <----- NOTE THIS

sudo chgrp -R www-data storage bootstrap/cache 
sudo chmod -R ug+rwx storage bootstrap/cache

```

Please note the particularity of this very answer: I am the only (here) adding the group bit to every folder. In this way, if someone or something creates a new subfolder, it automatically has `www-data` as group

> 
> this happens when we are forced to deploy some userland files, preloaded using ftp, and so new subfolders folders are always owned from www-data group even if created by ftp client
> 
> 
> 

> 
> Note also that the
> 
> 
> sudo chgrp -R www-data storage bootstrap/cache >
> 
> 
> is not needed if you do ALL of the commands in the list. But if you want to fix a ftp deploy, for example, and you didn't execute the 2nd line, so this is needed.
> 
> 
>
I'd do it like this:

```
sudo chown -R $USER:www-data laravel-project/ 

find laravel-project/ -type f -exec chmod 664 {} \;

find laravel-project/ -type d -exec chmod 775 {} \;

```

then finally, you need to give webserver permission to modify the `storage` and `bootstrap/cache` directories:

```
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache

```