Question: I am trying to write a an input code that can put 2 output all together and add it up. The code is below;

```
import numpy as np
x, y = input("Insert value").split()

print(x)
print(y)
print(np.add(x,y))

```

Output:

```
4
3

---------------------------------------------------------------------------
UFuncTypeError                            Traceback (most recent call last)
<ipython-input-10-d7826b294c37> in <module>
      4 print(x)
      5 print(y)
----> 6 print(np.add(x,y))

UFuncTypeError: ufunc 'add' did not contain a loop with signature matching types (dtype('<U1'), dtype('<U1')) -> dtype('<U1'

```

Can anyone help this?

Answer: 
Try this

```
observe({
    lapply(1:input$nomaps, function(i) {

      observeEvent(input[[paste0("plot_", i,"_shape_click")]], {
        # execute only if the polygon has never been clicked
        selected.id <- input[[paste0("plot_", i,"_shape_click")]]
        data <- rv$df[rv$df$ID==selected.id$id,]

        if (selected.id$group == "unclicked_poly") {
          change_color(map = paste0("plot_", i),
                       id_to_remove =  selected.id$id,
                       data = data,
                       colour = "yellow",
                       new_group = "clicked1_poly")
        } else {
          leafletProxy(paste0("plot_", i)) %>%
            removeShape(selected.id$id) %>% # remove previous occurrence
            addPolygons(
              data = data,
              label = as.character(data$display),
              layerId = data$ID,
              group = "unclicked_poly") # back to initialize group
        }
      })
    })
  })

```
```
 observe ({
    lapply(1:input$nomaps, function(i) {

      observeEvent(input[[paste0("plot_", i,"_shape_click",sep="")]], {
        # execute only if the polygon has never been clicked
        if (input[[paste0("plot_", i,"_shape_click",sep="")]]$group == "unclicked_poly") {

        selected.id <- input[[paste0("plot_", i,"_shape_click",sep="")]]

        data <- rv$df[rv$df$ID==selected.id$id,]

        change_color(map = paste0("plot_", i, sep=""),
                     id_to_remove =  selected.id$id,
                     data = data,
                     colour = "yellow",
                     new_group = "clicked1_poly") 
        } else {

          selected.id <- input[[paste0("plot_", i,"_shape_click",sep="")]]

          data <- rv$df[rv$df$ID==selected.id$id,]

              leafletProxy(paste0("plot_", i, sep="")) %>%
                removeShape(selected.id$id) %>% # remove previous occurrence
                addPolygons(
                  data = data,
                  label = as.character(data$display),
                  layerId = data$ID,
                  group = "unclicked_poly") # back to initialize group
        }
      })
    })
    })

```